/*
* Copyright 2018-2023 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 com.amazonaws.services.iotsitewise;
import org.w3c.dom.*;
import java.net.*;
import java.util.*;
import javax.annotation.Generated;
import org.apache.commons.logging.*;
import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;
import com.amazonaws.services.iotsitewise.AWSIoTSiteWiseClientBuilder;
import com.amazonaws.services.iotsitewise.waiters.AWSIoTSiteWiseWaiters;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.iotsitewise.model.*;
import com.amazonaws.services.iotsitewise.model.transform.*;
/**
* Client for accessing AWS IoT SiteWise. All service calls made using this client are blocking, and will not return
* until the service call completes.
*
*
* Welcome to the IoT SiteWise API Reference. IoT SiteWise is an Amazon Web Services service that connects Industrial Internet of Things
* (IIoT) devices to the power of the Amazon Web Services Cloud. For more information, see the IoT SiteWise User Guide. For information about
* IoT SiteWise quotas, see Quotas
* in the IoT SiteWise User Guide.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSIoTSiteWiseClient extends AmazonWebServiceClient implements AWSIoTSiteWise {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSIoTSiteWise.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "iotsitewise";
private volatile AWSIoTSiteWiseWaiters waiters;
/** Client configuration factory providing ClientConfigurations tailored to this client */
protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
private final AdvancedConfig advancedConfig;
private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory(
new JsonClientMetadata()
.withProtocolVersion("1.1")
.withSupportsCbor(false)
.withSupportsIon(false)
.withContentTypeOverride("application/json")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalFailureException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.InternalFailureExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.LimitExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.ResourceAlreadyExistsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnauthorizedException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.UnauthorizedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TooManyTagsException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.TooManyTagsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictingOperationException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.ConflictingOperationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.iotsitewise.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.iotsitewise.model.AWSIoTSiteWiseException.class));
public static AWSIoTSiteWiseClientBuilder builder() {
return AWSIoTSiteWiseClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on AWS IoT SiteWise using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSIoTSiteWiseClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on AWS IoT SiteWise using the specified parameters.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientParams
* Object providing client parameters.
*/
AWSIoTSiteWiseClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
super(clientParams);
this.awsCredentialsProvider = clientParams.getCredentialsProvider();
this.advancedConfig = clientParams.getAdvancedConfig();
init();
}
private void init() {
setServiceNameIntern(DEFAULT_SIGNING_NAME);
setEndpointPrefix(ENDPOINT_PREFIX);
// calling this.setEndPoint(...) will also modify the signer accordingly
setEndpoint("iotsitewise.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/iotsitewise/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/iotsitewise/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Associates a child asset with the given parent asset through a hierarchy defined in the parent asset's model. For
* more information, see Associating
* assets in the IoT SiteWise User Guide.
*
*
* @param associateAssetsRequest
* @return Result of the AssociateAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.AssociateAssets
* @see AWS
* API Documentation
*/
@Override
public AssociateAssetsResult associateAssets(AssociateAssetsRequest request) {
request = beforeClientExecution(request);
return executeAssociateAssets(request);
}
@SdkInternalApi
final AssociateAssetsResult executeAssociateAssets(AssociateAssetsRequest associateAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(associateAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Associates a time series (data stream) with an asset property.
*
*
* @param associateTimeSeriesToAssetPropertyRequest
* @return Result of the AssociateTimeSeriesToAssetProperty operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.AssociateTimeSeriesToAssetProperty
* @see AWS API Documentation
*/
@Override
public AssociateTimeSeriesToAssetPropertyResult associateTimeSeriesToAssetProperty(AssociateTimeSeriesToAssetPropertyRequest request) {
request = beforeClientExecution(request);
return executeAssociateTimeSeriesToAssetProperty(request);
}
@SdkInternalApi
final AssociateTimeSeriesToAssetPropertyResult executeAssociateTimeSeriesToAssetProperty(
AssociateTimeSeriesToAssetPropertyRequest associateTimeSeriesToAssetPropertyRequest) {
ExecutionContext executionContext = createExecutionContext(associateTimeSeriesToAssetPropertyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateTimeSeriesToAssetPropertyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(associateTimeSeriesToAssetPropertyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateTimeSeriesToAssetProperty");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociateTimeSeriesToAssetPropertyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Associates a group (batch) of assets with an IoT SiteWise Monitor project.
*
*
* @param batchAssociateProjectAssetsRequest
* @return Result of the BatchAssociateProjectAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.BatchAssociateProjectAssets
* @see AWS API Documentation
*/
@Override
public BatchAssociateProjectAssetsResult batchAssociateProjectAssets(BatchAssociateProjectAssetsRequest request) {
request = beforeClientExecution(request);
return executeBatchAssociateProjectAssets(request);
}
@SdkInternalApi
final BatchAssociateProjectAssetsResult executeBatchAssociateProjectAssets(BatchAssociateProjectAssetsRequest batchAssociateProjectAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(batchAssociateProjectAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchAssociateProjectAssetsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchAssociateProjectAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchAssociateProjectAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchAssociateProjectAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Disassociates a group (batch) of assets from an IoT SiteWise Monitor project.
*
*
* @param batchDisassociateProjectAssetsRequest
* @return Result of the BatchDisassociateProjectAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.BatchDisassociateProjectAssets
* @see AWS API Documentation
*/
@Override
public BatchDisassociateProjectAssetsResult batchDisassociateProjectAssets(BatchDisassociateProjectAssetsRequest request) {
request = beforeClientExecution(request);
return executeBatchDisassociateProjectAssets(request);
}
@SdkInternalApi
final BatchDisassociateProjectAssetsResult executeBatchDisassociateProjectAssets(BatchDisassociateProjectAssetsRequest batchDisassociateProjectAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(batchDisassociateProjectAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDisassociateProjectAssetsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchDisassociateProjectAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDisassociateProjectAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchDisassociateProjectAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets aggregated values (for example, average, minimum, and maximum) for one or more asset properties. For more
* information, see Querying
* aggregates in the IoT SiteWise User Guide.
*
*
* @param batchGetAssetPropertyAggregatesRequest
* @return Result of the BatchGetAssetPropertyAggregates operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.BatchGetAssetPropertyAggregates
* @see AWS API Documentation
*/
@Override
public BatchGetAssetPropertyAggregatesResult batchGetAssetPropertyAggregates(BatchGetAssetPropertyAggregatesRequest request) {
request = beforeClientExecution(request);
return executeBatchGetAssetPropertyAggregates(request);
}
@SdkInternalApi
final BatchGetAssetPropertyAggregatesResult executeBatchGetAssetPropertyAggregates(
BatchGetAssetPropertyAggregatesRequest batchGetAssetPropertyAggregatesRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetAssetPropertyAggregatesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetAssetPropertyAggregatesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchGetAssetPropertyAggregatesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetAssetPropertyAggregates");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchGetAssetPropertyAggregatesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the current value for one or more asset properties. For more information, see Querying current values in the IoT SiteWise User Guide.
*
*
* @param batchGetAssetPropertyValueRequest
* @return Result of the BatchGetAssetPropertyValue operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.BatchGetAssetPropertyValue
* @see AWS API Documentation
*/
@Override
public BatchGetAssetPropertyValueResult batchGetAssetPropertyValue(BatchGetAssetPropertyValueRequest request) {
request = beforeClientExecution(request);
return executeBatchGetAssetPropertyValue(request);
}
@SdkInternalApi
final BatchGetAssetPropertyValueResult executeBatchGetAssetPropertyValue(BatchGetAssetPropertyValueRequest batchGetAssetPropertyValueRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetAssetPropertyValueRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetAssetPropertyValueRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchGetAssetPropertyValueRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetAssetPropertyValue");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchGetAssetPropertyValueResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the historical values for one or more asset properties. For more information, see Querying historical values in the IoT SiteWise User Guide.
*
*
* @param batchGetAssetPropertyValueHistoryRequest
* @return Result of the BatchGetAssetPropertyValueHistory operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.BatchGetAssetPropertyValueHistory
* @see AWS API Documentation
*/
@Override
public BatchGetAssetPropertyValueHistoryResult batchGetAssetPropertyValueHistory(BatchGetAssetPropertyValueHistoryRequest request) {
request = beforeClientExecution(request);
return executeBatchGetAssetPropertyValueHistory(request);
}
@SdkInternalApi
final BatchGetAssetPropertyValueHistoryResult executeBatchGetAssetPropertyValueHistory(
BatchGetAssetPropertyValueHistoryRequest batchGetAssetPropertyValueHistoryRequest) {
ExecutionContext executionContext = createExecutionContext(batchGetAssetPropertyValueHistoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetAssetPropertyValueHistoryRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchGetAssetPropertyValueHistoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetAssetPropertyValueHistory");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchGetAssetPropertyValueHistoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sends a list of asset property values to IoT SiteWise. Each value is a timestamp-quality-value (TQV) data point.
* For more information, see Ingesting data using the API
* in the IoT SiteWise User Guide.
*
*
* To identify an asset property, you must specify one of the following:
*
*
* -
*
* The assetId
and propertyId
of an asset property.
*
*
* -
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
*
*
*
*
* With respect to Unix epoch time, IoT SiteWise accepts only TQVs that have a timestamp of no more than 7 days in
* the past and no more than 10 minutes in the future. IoT SiteWise rejects timestamps outside of the inclusive
* range of [-7 days, +10 minutes] and returns a TimestampOutOfRangeException
error.
*
*
* For each asset property, IoT SiteWise overwrites TQVs with duplicate timestamps unless the newer TQV has a
* different quality. For example, if you store a TQV {T1, GOOD, V1}
, then storing
* {T1, GOOD, V2}
replaces the existing TQV.
*
*
*
* IoT SiteWise authorizes access to each BatchPutAssetPropertyValue
entry individually. For more
* information, see BatchPutAssetPropertyValue authorization in the IoT SiteWise User Guide.
*
*
* @param batchPutAssetPropertyValueRequest
* @return Result of the BatchPutAssetPropertyValue operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.BatchPutAssetPropertyValue
* @see AWS API Documentation
*/
@Override
public BatchPutAssetPropertyValueResult batchPutAssetPropertyValue(BatchPutAssetPropertyValueRequest request) {
request = beforeClientExecution(request);
return executeBatchPutAssetPropertyValue(request);
}
@SdkInternalApi
final BatchPutAssetPropertyValueResult executeBatchPutAssetPropertyValue(BatchPutAssetPropertyValueRequest batchPutAssetPropertyValueRequest) {
ExecutionContext executionContext = createExecutionContext(batchPutAssetPropertyValueRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchPutAssetPropertyValueRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(batchPutAssetPropertyValueRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchPutAssetPropertyValue");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new BatchPutAssetPropertyValueResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group,
* or IAM user) access to the specified IoT SiteWise Monitor portal or project resource.
*
*
* @param createAccessPolicyRequest
* @return Result of the CreateAccessPolicy operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.CreateAccessPolicy
* @see AWS
* API Documentation
*/
@Override
public CreateAccessPolicyResult createAccessPolicy(CreateAccessPolicyRequest request) {
request = beforeClientExecution(request);
return executeCreateAccessPolicy(request);
}
@SdkInternalApi
final CreateAccessPolicyResult executeCreateAccessPolicy(CreateAccessPolicyRequest createAccessPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(createAccessPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAccessPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAccessPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAccessPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAccessPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an asset from an existing asset model. For more information, see Creating assets in the
* IoT SiteWise User Guide.
*
*
* @param createAssetRequest
* @return Result of the CreateAsset operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.CreateAsset
* @see AWS API
* Documentation
*/
@Override
public CreateAssetResult createAsset(CreateAssetRequest request) {
request = beforeClientExecution(request);
return executeCreateAsset(request);
}
@SdkInternalApi
final CreateAssetResult executeCreateAsset(CreateAssetRequest createAssetRequest) {
ExecutionContext executionContext = createExecutionContext(createAssetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAssetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAsset");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAssetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an asset model from specified property and hierarchy definitions. You create assets from asset models.
* With asset models, you can easily create assets of the same type that have standardized definitions. Each asset
* created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in
* the IoT SiteWise User Guide.
*
*
* @param createAssetModelRequest
* @return Result of the CreateAssetModel operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.CreateAssetModel
* @see AWS
* API Documentation
*/
@Override
public CreateAssetModelResult createAssetModel(CreateAssetModelRequest request) {
request = beforeClientExecution(request);
return executeCreateAssetModel(request);
}
@SdkInternalApi
final CreateAssetModelResult executeCreateAssetModel(CreateAssetModelRequest createAssetModelRequest) {
ExecutionContext executionContext = createExecutionContext(createAssetModelRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAssetModelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAssetModelRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAssetModel");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAssetModelResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Defines a job to ingest data to IoT SiteWise from Amazon S3. For more information, see Create a bulk import
* job (CLI) in the Amazon Simple Storage Service User Guide.
*
*
*
* You must enable IoT SiteWise to export data to Amazon S3 before you create a bulk import job. For more
* information about how to configure storage settings, see PutStorageConfiguration.
*
*
*
* @param createBulkImportJobRequest
* @return Result of the CreateBulkImportJob operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.CreateBulkImportJob
* @see AWS API Documentation
*/
@Override
public CreateBulkImportJobResult createBulkImportJob(CreateBulkImportJobRequest request) {
request = beforeClientExecution(request);
return executeCreateBulkImportJob(request);
}
@SdkInternalApi
final CreateBulkImportJobResult executeCreateBulkImportJob(CreateBulkImportJobRequest createBulkImportJobRequest) {
ExecutionContext executionContext = createExecutionContext(createBulkImportJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateBulkImportJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBulkImportJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBulkImportJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBulkImportJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a dashboard in an IoT SiteWise Monitor project.
*
*
* @param createDashboardRequest
* @return Result of the CreateDashboard operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.CreateDashboard
* @see AWS
* API Documentation
*/
@Override
public CreateDashboardResult createDashboard(CreateDashboardRequest request) {
request = beforeClientExecution(request);
return executeCreateDashboard(request);
}
@SdkInternalApi
final CreateDashboardResult executeCreateDashboard(CreateDashboardRequest createDashboardRequest) {
ExecutionContext executionContext = createExecutionContext(createDashboardRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDashboardRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDashboardRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDashboard");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDashboardResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a gateway, which is a virtual or edge device that delivers industrial data streams from local servers to
* IoT SiteWise. For more information, see Ingesting data using a
* gateway in the IoT SiteWise User Guide.
*
*
* @param createGatewayRequest
* @return Result of the CreateGateway operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.CreateGateway
* @see AWS API
* Documentation
*/
@Override
public CreateGatewayResult createGateway(CreateGatewayRequest request) {
request = beforeClientExecution(request);
return executeCreateGateway(request);
}
@SdkInternalApi
final CreateGatewayResult executeCreateGateway(CreateGatewayRequest createGatewayRequest) {
ExecutionContext executionContext = createExecutionContext(createGatewayRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateGatewayRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createGatewayRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGateway");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateGatewayResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a portal, which can contain projects and dashboards. IoT SiteWise Monitor uses IAM Identity Center or IAM
* to authenticate portal users and manage user permissions.
*
*
*
* Before you can sign in to a new portal, you must add at least one identity to that portal. For more information,
* see Adding or removing portal administrators in the IoT SiteWise User Guide.
*
*
*
* @param createPortalRequest
* @return Result of the CreatePortal operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.CreatePortal
* @see AWS API
* Documentation
*/
@Override
public CreatePortalResult createPortal(CreatePortalRequest request) {
request = beforeClientExecution(request);
return executeCreatePortal(request);
}
@SdkInternalApi
final CreatePortalResult executeCreatePortal(CreatePortalRequest createPortalRequest) {
ExecutionContext executionContext = createExecutionContext(createPortalRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreatePortalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPortalRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePortal");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePortalResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a project in the specified portal.
*
*
*
* Make sure that the project name and description don't contain confidential information.
*
*
*
* @param createProjectRequest
* @return Result of the CreateProject operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.CreateProject
* @see AWS API
* Documentation
*/
@Override
public CreateProjectResult createProject(CreateProjectRequest request) {
request = beforeClientExecution(request);
return executeCreateProject(request);
}
@SdkInternalApi
final CreateProjectResult executeCreateProject(CreateProjectRequest createProjectRequest) {
ExecutionContext executionContext = createExecutionContext(createProjectRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateProjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createProjectRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProject");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateProjectResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an access policy that grants the specified identity access to the specified IoT SiteWise Monitor
* resource. You can use this operation to revoke access to an IoT SiteWise Monitor resource.
*
*
* @param deleteAccessPolicyRequest
* @return Result of the DeleteAccessPolicy operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DeleteAccessPolicy
* @see AWS
* API Documentation
*/
@Override
public DeleteAccessPolicyResult deleteAccessPolicy(DeleteAccessPolicyRequest request) {
request = beforeClientExecution(request);
return executeDeleteAccessPolicy(request);
}
@SdkInternalApi
final DeleteAccessPolicyResult executeDeleteAccessPolicy(DeleteAccessPolicyRequest deleteAccessPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAccessPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAccessPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAccessPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAccessPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAccessPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an asset. This action can't be undone. For more information, see Deleting assets
* and models in the IoT SiteWise User Guide.
*
*
*
* You can't delete an asset that's associated to another asset. For more information, see DisassociateAssets.
*
*
*
* @param deleteAssetRequest
* @return Result of the DeleteAsset operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DeleteAsset
* @see AWS API
* Documentation
*/
@Override
public DeleteAssetResult deleteAsset(DeleteAssetRequest request) {
request = beforeClientExecution(request);
return executeDeleteAsset(request);
}
@SdkInternalApi
final DeleteAssetResult executeDeleteAsset(DeleteAssetRequest deleteAssetRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAssetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAssetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAsset");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAssetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an asset model. This action can't be undone. You must delete all assets created from an asset model
* before you can delete the model. Also, you can't delete an asset model if a parent asset model exists that
* contains a property formula expression that depends on the asset model that you want to delete. For more
* information, see Deleting assets
* and models in the IoT SiteWise User Guide.
*
*
* @param deleteAssetModelRequest
* @return Result of the DeleteAssetModel operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DeleteAssetModel
* @see AWS
* API Documentation
*/
@Override
public DeleteAssetModelResult deleteAssetModel(DeleteAssetModelRequest request) {
request = beforeClientExecution(request);
return executeDeleteAssetModel(request);
}
@SdkInternalApi
final DeleteAssetModelResult executeDeleteAssetModel(DeleteAssetModelRequest deleteAssetModelRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAssetModelRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAssetModelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAssetModelRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAssetModel");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAssetModelResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a dashboard from IoT SiteWise Monitor.
*
*
* @param deleteDashboardRequest
* @return Result of the DeleteDashboard operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DeleteDashboard
* @see AWS
* API Documentation
*/
@Override
public DeleteDashboardResult deleteDashboard(DeleteDashboardRequest request) {
request = beforeClientExecution(request);
return executeDeleteDashboard(request);
}
@SdkInternalApi
final DeleteDashboardResult executeDeleteDashboard(DeleteDashboardRequest deleteDashboardRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDashboardRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDashboardRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDashboardRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDashboard");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDashboardResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a gateway from IoT SiteWise. When you delete a gateway, some of the gateway's files remain in your
* gateway's file system.
*
*
* @param deleteGatewayRequest
* @return Result of the DeleteGateway operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DeleteGateway
* @see AWS API
* Documentation
*/
@Override
public DeleteGatewayResult deleteGateway(DeleteGatewayRequest request) {
request = beforeClientExecution(request);
return executeDeleteGateway(request);
}
@SdkInternalApi
final DeleteGatewayResult executeDeleteGateway(DeleteGatewayRequest deleteGatewayRequest) {
ExecutionContext executionContext = createExecutionContext(deleteGatewayRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteGatewayRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteGatewayRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteGateway");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteGatewayResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a portal from IoT SiteWise Monitor.
*
*
* @param deletePortalRequest
* @return Result of the DeletePortal operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DeletePortal
* @see AWS API
* Documentation
*/
@Override
public DeletePortalResult deletePortal(DeletePortalRequest request) {
request = beforeClientExecution(request);
return executeDeletePortal(request);
}
@SdkInternalApi
final DeletePortalResult executeDeletePortal(DeletePortalRequest deletePortalRequest) {
ExecutionContext executionContext = createExecutionContext(deletePortalRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePortalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePortalRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePortal");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePortalResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a project from IoT SiteWise Monitor.
*
*
* @param deleteProjectRequest
* @return Result of the DeleteProject operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DeleteProject
* @see AWS API
* Documentation
*/
@Override
public DeleteProjectResult deleteProject(DeleteProjectRequest request) {
request = beforeClientExecution(request);
return executeDeleteProject(request);
}
@SdkInternalApi
final DeleteProjectResult executeDeleteProject(DeleteProjectRequest deleteProjectRequest) {
ExecutionContext executionContext = createExecutionContext(deleteProjectRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteProjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteProjectRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProject");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteProjectResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a time series (data stream). If you delete a time series that's associated with an asset property, the
* asset property still exists, but the time series will no longer be associated with this asset property.
*
*
* To identify a time series, do one of the following:
*
*
* -
*
* If the time series isn't associated with an asset property, specify the alias
of the time series.
*
*
* -
*
* If the time series is associated with an asset property, specify one of the following:
*
*
*
*
*
* @param deleteTimeSeriesRequest
* @return Result of the DeleteTimeSeries operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DeleteTimeSeries
* @see AWS
* API Documentation
*/
@Override
public DeleteTimeSeriesResult deleteTimeSeries(DeleteTimeSeriesRequest request) {
request = beforeClientExecution(request);
return executeDeleteTimeSeries(request);
}
@SdkInternalApi
final DeleteTimeSeriesResult executeDeleteTimeSeries(DeleteTimeSeriesRequest deleteTimeSeriesRequest) {
ExecutionContext executionContext = createExecutionContext(deleteTimeSeriesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTimeSeriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTimeSeriesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTimeSeries");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTimeSeriesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes an access policy, which specifies an identity's access to an IoT SiteWise Monitor portal or project.
*
*
* @param describeAccessPolicyRequest
* @return Result of the DescribeAccessPolicy operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeAccessPolicy
* @see AWS API Documentation
*/
@Override
public DescribeAccessPolicyResult describeAccessPolicy(DescribeAccessPolicyRequest request) {
request = beforeClientExecution(request);
return executeDescribeAccessPolicy(request);
}
@SdkInternalApi
final DescribeAccessPolicyResult executeDescribeAccessPolicy(DescribeAccessPolicyRequest describeAccessPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(describeAccessPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAccessPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAccessPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAccessPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAccessPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about an asset.
*
*
* @param describeAssetRequest
* @return Result of the DescribeAsset operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeAsset
* @see AWS API
* Documentation
*/
@Override
public DescribeAssetResult describeAsset(DescribeAssetRequest request) {
request = beforeClientExecution(request);
return executeDescribeAsset(request);
}
@SdkInternalApi
final DescribeAssetResult executeDescribeAsset(DescribeAssetRequest describeAssetRequest) {
ExecutionContext executionContext = createExecutionContext(describeAssetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAssetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAsset");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAssetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about an asset model.
*
*
* @param describeAssetModelRequest
* @return Result of the DescribeAssetModel operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeAssetModel
* @see AWS
* API Documentation
*/
@Override
public DescribeAssetModelResult describeAssetModel(DescribeAssetModelRequest request) {
request = beforeClientExecution(request);
return executeDescribeAssetModel(request);
}
@SdkInternalApi
final DescribeAssetModelResult executeDescribeAssetModel(DescribeAssetModelRequest describeAssetModelRequest) {
ExecutionContext executionContext = createExecutionContext(describeAssetModelRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAssetModelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAssetModelRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAssetModel");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAssetModelResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about an asset property.
*
*
*
* When you call this operation for an attribute property, this response includes the default attribute value that
* you define in the asset model. If you update the default value in the model, this operation's response includes
* the new default value.
*
*
*
* This operation doesn't return the value of the asset property. To get the value of an asset property, use
* GetAssetPropertyValue.
*
*
* @param describeAssetPropertyRequest
* @return Result of the DescribeAssetProperty operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeAssetProperty
* @see AWS API Documentation
*/
@Override
public DescribeAssetPropertyResult describeAssetProperty(DescribeAssetPropertyRequest request) {
request = beforeClientExecution(request);
return executeDescribeAssetProperty(request);
}
@SdkInternalApi
final DescribeAssetPropertyResult executeDescribeAssetProperty(DescribeAssetPropertyRequest describeAssetPropertyRequest) {
ExecutionContext executionContext = createExecutionContext(describeAssetPropertyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAssetPropertyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAssetPropertyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAssetProperty");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeAssetPropertyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a bulk import job request. For more information, see Describe a bulk
* import job (CLI) in the Amazon Simple Storage Service User Guide.
*
*
* @param describeBulkImportJobRequest
* @return Result of the DescribeBulkImportJob operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeBulkImportJob
* @see AWS API Documentation
*/
@Override
public DescribeBulkImportJobResult describeBulkImportJob(DescribeBulkImportJobRequest request) {
request = beforeClientExecution(request);
return executeDescribeBulkImportJob(request);
}
@SdkInternalApi
final DescribeBulkImportJobResult executeDescribeBulkImportJob(DescribeBulkImportJobRequest describeBulkImportJobRequest) {
ExecutionContext executionContext = createExecutionContext(describeBulkImportJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeBulkImportJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBulkImportJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBulkImportJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeBulkImportJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a dashboard.
*
*
* @param describeDashboardRequest
* @return Result of the DescribeDashboard operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeDashboard
* @see AWS
* API Documentation
*/
@Override
public DescribeDashboardResult describeDashboard(DescribeDashboardRequest request) {
request = beforeClientExecution(request);
return executeDescribeDashboard(request);
}
@SdkInternalApi
final DescribeDashboardResult executeDescribeDashboard(DescribeDashboardRequest describeDashboardRequest) {
ExecutionContext executionContext = createExecutionContext(describeDashboardRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDashboardRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDashboardRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDashboard");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDashboardResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about the default encryption configuration for the Amazon Web Services account in the
* default or specified Region. For more information, see Key management in the
* IoT SiteWise User Guide.
*
*
* @param describeDefaultEncryptionConfigurationRequest
* @return Result of the DescribeDefaultEncryptionConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeDefaultEncryptionConfiguration
* @see AWS API Documentation
*/
@Override
public DescribeDefaultEncryptionConfigurationResult describeDefaultEncryptionConfiguration(DescribeDefaultEncryptionConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeDefaultEncryptionConfiguration(request);
}
@SdkInternalApi
final DescribeDefaultEncryptionConfigurationResult executeDescribeDefaultEncryptionConfiguration(
DescribeDefaultEncryptionConfigurationRequest describeDefaultEncryptionConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeDefaultEncryptionConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDefaultEncryptionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeDefaultEncryptionConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDefaultEncryptionConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeDefaultEncryptionConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a gateway.
*
*
* @param describeGatewayRequest
* @return Result of the DescribeGateway operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeGateway
* @see AWS
* API Documentation
*/
@Override
public DescribeGatewayResult describeGateway(DescribeGatewayRequest request) {
request = beforeClientExecution(request);
return executeDescribeGateway(request);
}
@SdkInternalApi
final DescribeGatewayResult executeDescribeGateway(DescribeGatewayRequest describeGatewayRequest) {
ExecutionContext executionContext = createExecutionContext(describeGatewayRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeGatewayRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeGatewayRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeGateway");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeGatewayResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a gateway capability configuration. Each gateway capability defines data sources for
* a gateway. A capability configuration can contain multiple data source configurations. If you define OPC-UA
* sources for a gateway in the IoT SiteWise console, all of your OPC-UA sources are stored in one capability
* configuration. To list all capability configurations for a gateway, use DescribeGateway.
*
*
* @param describeGatewayCapabilityConfigurationRequest
* @return Result of the DescribeGatewayCapabilityConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeGatewayCapabilityConfiguration
* @see AWS API Documentation
*/
@Override
public DescribeGatewayCapabilityConfigurationResult describeGatewayCapabilityConfiguration(DescribeGatewayCapabilityConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeGatewayCapabilityConfiguration(request);
}
@SdkInternalApi
final DescribeGatewayCapabilityConfigurationResult executeDescribeGatewayCapabilityConfiguration(
DescribeGatewayCapabilityConfigurationRequest describeGatewayCapabilityConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeGatewayCapabilityConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeGatewayCapabilityConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeGatewayCapabilityConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeGatewayCapabilityConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeGatewayCapabilityConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the current IoT SiteWise logging options.
*
*
* @param describeLoggingOptionsRequest
* @return Result of the DescribeLoggingOptions operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @sample AWSIoTSiteWise.DescribeLoggingOptions
* @see AWS API Documentation
*/
@Override
public DescribeLoggingOptionsResult describeLoggingOptions(DescribeLoggingOptionsRequest request) {
request = beforeClientExecution(request);
return executeDescribeLoggingOptions(request);
}
@SdkInternalApi
final DescribeLoggingOptionsResult executeDescribeLoggingOptions(DescribeLoggingOptionsRequest describeLoggingOptionsRequest) {
ExecutionContext executionContext = createExecutionContext(describeLoggingOptionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeLoggingOptionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeLoggingOptionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeLoggingOptions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeLoggingOptionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a portal.
*
*
* @param describePortalRequest
* @return Result of the DescribePortal operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribePortal
* @see AWS API
* Documentation
*/
@Override
public DescribePortalResult describePortal(DescribePortalRequest request) {
request = beforeClientExecution(request);
return executeDescribePortal(request);
}
@SdkInternalApi
final DescribePortalResult executeDescribePortal(DescribePortalRequest describePortalRequest) {
ExecutionContext executionContext = createExecutionContext(describePortalRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribePortalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePortalRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePortal");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePortalResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a project.
*
*
* @param describeProjectRequest
* @return Result of the DescribeProject operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeProject
* @see AWS
* API Documentation
*/
@Override
public DescribeProjectResult describeProject(DescribeProjectRequest request) {
request = beforeClientExecution(request);
return executeDescribeProject(request);
}
@SdkInternalApi
final DescribeProjectResult executeDescribeProject(DescribeProjectRequest describeProjectRequest) {
ExecutionContext executionContext = createExecutionContext(describeProjectRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeProjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeProjectRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeProject");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeProjectResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about the storage configuration for IoT SiteWise.
*
*
* @param describeStorageConfigurationRequest
* @return Result of the DescribeStorageConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DescribeStorageConfiguration
* @see AWS API Documentation
*/
@Override
public DescribeStorageConfigurationResult describeStorageConfiguration(DescribeStorageConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeStorageConfiguration(request);
}
@SdkInternalApi
final DescribeStorageConfigurationResult executeDescribeStorageConfiguration(DescribeStorageConfigurationRequest describeStorageConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeStorageConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeStorageConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeStorageConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeStorageConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeStorageConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves information about a time series (data stream).
*
*
* To identify a time series, do one of the following:
*
*
* -
*
* If the time series isn't associated with an asset property, specify the alias
of the time series.
*
*
* -
*
* If the time series is associated with an asset property, specify one of the following:
*
*
*
*
*
* @param describeTimeSeriesRequest
* @return Result of the DescribeTimeSeries operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.DescribeTimeSeries
* @see AWS
* API Documentation
*/
@Override
public DescribeTimeSeriesResult describeTimeSeries(DescribeTimeSeriesRequest request) {
request = beforeClientExecution(request);
return executeDescribeTimeSeries(request);
}
@SdkInternalApi
final DescribeTimeSeriesResult executeDescribeTimeSeries(DescribeTimeSeriesRequest describeTimeSeriesRequest) {
ExecutionContext executionContext = createExecutionContext(describeTimeSeriesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeTimeSeriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTimeSeriesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTimeSeries");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTimeSeriesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Disassociates a child asset from the given parent asset through a hierarchy defined in the parent asset's model.
*
*
* @param disassociateAssetsRequest
* @return Result of the DisassociateAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DisassociateAssets
* @see AWS
* API Documentation
*/
@Override
public DisassociateAssetsResult disassociateAssets(DisassociateAssetsRequest request) {
request = beforeClientExecution(request);
return executeDisassociateAssets(request);
}
@SdkInternalApi
final DisassociateAssetsResult executeDisassociateAssets(DisassociateAssetsRequest disassociateAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(disassociateAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociateAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociateAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Disassociates a time series (data stream) from an asset property.
*
*
* @param disassociateTimeSeriesFromAssetPropertyRequest
* @return Result of the DisassociateTimeSeriesFromAssetProperty operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.DisassociateTimeSeriesFromAssetProperty
* @see AWS API Documentation
*/
@Override
public DisassociateTimeSeriesFromAssetPropertyResult disassociateTimeSeriesFromAssetProperty(DisassociateTimeSeriesFromAssetPropertyRequest request) {
request = beforeClientExecution(request);
return executeDisassociateTimeSeriesFromAssetProperty(request);
}
@SdkInternalApi
final DisassociateTimeSeriesFromAssetPropertyResult executeDisassociateTimeSeriesFromAssetProperty(
DisassociateTimeSeriesFromAssetPropertyRequest disassociateTimeSeriesFromAssetPropertyRequest) {
ExecutionContext executionContext = createExecutionContext(disassociateTimeSeriesFromAssetPropertyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociateTimeSeriesFromAssetPropertyRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(disassociateTimeSeriesFromAssetPropertyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateTimeSeriesFromAssetProperty");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisassociateTimeSeriesFromAssetPropertyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets aggregated values for an asset property. For more information, see Querying
* aggregates in the IoT SiteWise User Guide.
*
*
* To identify an asset property, you must specify one of the following:
*
*
* -
*
* The assetId
and propertyId
of an asset property.
*
*
* -
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
*
*
*
* @param getAssetPropertyAggregatesRequest
* @return Result of the GetAssetPropertyAggregates operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.GetAssetPropertyAggregates
* @see AWS API Documentation
*/
@Override
public GetAssetPropertyAggregatesResult getAssetPropertyAggregates(GetAssetPropertyAggregatesRequest request) {
request = beforeClientExecution(request);
return executeGetAssetPropertyAggregates(request);
}
@SdkInternalApi
final GetAssetPropertyAggregatesResult executeGetAssetPropertyAggregates(GetAssetPropertyAggregatesRequest getAssetPropertyAggregatesRequest) {
ExecutionContext executionContext = createExecutionContext(getAssetPropertyAggregatesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetAssetPropertyAggregatesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getAssetPropertyAggregatesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAssetPropertyAggregates");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetAssetPropertyAggregatesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets an asset property's current value. For more information, see Querying current values in the IoT SiteWise User Guide.
*
*
* To identify an asset property, you must specify one of the following:
*
*
* -
*
* The assetId
and propertyId
of an asset property.
*
*
* -
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
*
*
*
* @param getAssetPropertyValueRequest
* @return Result of the GetAssetPropertyValue operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.GetAssetPropertyValue
* @see AWS API Documentation
*/
@Override
public GetAssetPropertyValueResult getAssetPropertyValue(GetAssetPropertyValueRequest request) {
request = beforeClientExecution(request);
return executeGetAssetPropertyValue(request);
}
@SdkInternalApi
final GetAssetPropertyValueResult executeGetAssetPropertyValue(GetAssetPropertyValueRequest getAssetPropertyValueRequest) {
ExecutionContext executionContext = createExecutionContext(getAssetPropertyValueRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetAssetPropertyValueRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAssetPropertyValueRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAssetPropertyValue");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetAssetPropertyValueResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets the history of an asset property's values. For more information, see Querying historical values in the IoT SiteWise User Guide.
*
*
* To identify an asset property, you must specify one of the following:
*
*
* -
*
* The assetId
and propertyId
of an asset property.
*
*
* -
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
*
*
*
* @param getAssetPropertyValueHistoryRequest
* @return Result of the GetAssetPropertyValueHistory operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.GetAssetPropertyValueHistory
* @see AWS API Documentation
*/
@Override
public GetAssetPropertyValueHistoryResult getAssetPropertyValueHistory(GetAssetPropertyValueHistoryRequest request) {
request = beforeClientExecution(request);
return executeGetAssetPropertyValueHistory(request);
}
@SdkInternalApi
final GetAssetPropertyValueHistoryResult executeGetAssetPropertyValueHistory(GetAssetPropertyValueHistoryRequest getAssetPropertyValueHistoryRequest) {
ExecutionContext executionContext = createExecutionContext(getAssetPropertyValueHistoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetAssetPropertyValueHistoryRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getAssetPropertyValueHistoryRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAssetPropertyValueHistory");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetAssetPropertyValueHistoryResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Get interpolated values for an asset property for a specified time interval, during a period of time. If your
* time series is missing data points during the specified time interval, you can use interpolation to estimate the
* missing data.
*
*
* For example, you can use this operation to return the interpolated temperature values for a wind turbine every 24
* hours over a duration of 7 days.
*
*
* To identify an asset property, you must specify one of the following:
*
*
* -
*
* The assetId
and propertyId
of an asset property.
*
*
* -
*
* A propertyAlias
, which is a data stream alias (for example,
* /company/windfarm/3/turbine/7/temperature
). To define an asset property's alias, see UpdateAssetProperty.
*
*
*
*
* @param getInterpolatedAssetPropertyValuesRequest
* @return Result of the GetInterpolatedAssetPropertyValues operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ServiceUnavailableException
* The requested service is unavailable.
* @sample AWSIoTSiteWise.GetInterpolatedAssetPropertyValues
* @see AWS API Documentation
*/
@Override
public GetInterpolatedAssetPropertyValuesResult getInterpolatedAssetPropertyValues(GetInterpolatedAssetPropertyValuesRequest request) {
request = beforeClientExecution(request);
return executeGetInterpolatedAssetPropertyValues(request);
}
@SdkInternalApi
final GetInterpolatedAssetPropertyValuesResult executeGetInterpolatedAssetPropertyValues(
GetInterpolatedAssetPropertyValuesRequest getInterpolatedAssetPropertyValuesRequest) {
ExecutionContext executionContext = createExecutionContext(getInterpolatedAssetPropertyValuesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetInterpolatedAssetPropertyValuesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(getInterpolatedAssetPropertyValuesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInterpolatedAssetPropertyValues");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new GetInterpolatedAssetPropertyValuesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of access policies for an identity (an IAM Identity Center user, an IAM Identity
* Center group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or project).
*
*
* @param listAccessPoliciesRequest
* @return Result of the ListAccessPolicies operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAccessPolicies
* @see AWS
* API Documentation
*/
@Override
public ListAccessPoliciesResult listAccessPolicies(ListAccessPoliciesRequest request) {
request = beforeClientExecution(request);
return executeListAccessPolicies(request);
}
@SdkInternalApi
final ListAccessPoliciesResult executeListAccessPolicies(ListAccessPoliciesRequest listAccessPoliciesRequest) {
ExecutionContext executionContext = createExecutionContext(listAccessPoliciesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAccessPoliciesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAccessPoliciesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAccessPolicies");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAccessPoliciesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of properties associated with an asset model. If you update properties associated with
* the model before you finish listing all the properties, you need to start all over again.
*
*
* @param listAssetModelPropertiesRequest
* @return Result of the ListAssetModelProperties operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssetModelProperties
* @see AWS API Documentation
*/
@Override
public ListAssetModelPropertiesResult listAssetModelProperties(ListAssetModelPropertiesRequest request) {
request = beforeClientExecution(request);
return executeListAssetModelProperties(request);
}
@SdkInternalApi
final ListAssetModelPropertiesResult executeListAssetModelProperties(ListAssetModelPropertiesRequest listAssetModelPropertiesRequest) {
ExecutionContext executionContext = createExecutionContext(listAssetModelPropertiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssetModelPropertiesRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(listAssetModelPropertiesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssetModelProperties");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListAssetModelPropertiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of summaries of all asset models.
*
*
* @param listAssetModelsRequest
* @return Result of the ListAssetModels operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssetModels
* @see AWS
* API Documentation
*/
@Override
public ListAssetModelsResult listAssetModels(ListAssetModelsRequest request) {
request = beforeClientExecution(request);
return executeListAssetModels(request);
}
@SdkInternalApi
final ListAssetModelsResult executeListAssetModels(ListAssetModelsRequest listAssetModelsRequest) {
ExecutionContext executionContext = createExecutionContext(listAssetModelsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssetModelsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssetModelsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssetModels");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAssetModelsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of properties associated with an asset. If you update properties associated with the
* model before you finish listing all the properties, you need to start all over again.
*
*
* @param listAssetPropertiesRequest
* @return Result of the ListAssetProperties operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssetProperties
* @see AWS API Documentation
*/
@Override
public ListAssetPropertiesResult listAssetProperties(ListAssetPropertiesRequest request) {
request = beforeClientExecution(request);
return executeListAssetProperties(request);
}
@SdkInternalApi
final ListAssetPropertiesResult executeListAssetProperties(ListAssetPropertiesRequest listAssetPropertiesRequest) {
ExecutionContext executionContext = createExecutionContext(listAssetPropertiesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssetPropertiesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssetPropertiesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssetProperties");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAssetPropertiesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of asset relationships for an asset. You can use this operation to identify an asset's
* root asset and all associated assets between that asset and its root.
*
*
* @param listAssetRelationshipsRequest
* @return Result of the ListAssetRelationships operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssetRelationships
* @see AWS API Documentation
*/
@Override
public ListAssetRelationshipsResult listAssetRelationships(ListAssetRelationshipsRequest request) {
request = beforeClientExecution(request);
return executeListAssetRelationships(request);
}
@SdkInternalApi
final ListAssetRelationshipsResult executeListAssetRelationships(ListAssetRelationshipsRequest listAssetRelationshipsRequest) {
ExecutionContext executionContext = createExecutionContext(listAssetRelationshipsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssetRelationshipsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssetRelationshipsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssetRelationships");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListAssetRelationshipsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of asset summaries.
*
*
* You can use this operation to do the following:
*
*
*
* You can't use this operation to list all assets. To retrieve summaries for all of your assets, use ListAssetModels
* to get all of your asset model IDs. Then, use ListAssets to get all assets for each asset model.
*
*
* @param listAssetsRequest
* @return Result of the ListAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssets
* @see AWS API
* Documentation
*/
@Override
public ListAssetsResult listAssets(ListAssetsRequest request) {
request = beforeClientExecution(request);
return executeListAssets(request);
}
@SdkInternalApi
final ListAssetsResult executeListAssets(ListAssetsRequest listAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(listAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of associated assets.
*
*
* You can use this operation to do the following:
*
*
*
* @param listAssociatedAssetsRequest
* @return Result of the ListAssociatedAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListAssociatedAssets
* @see AWS API Documentation
*/
@Override
public ListAssociatedAssetsResult listAssociatedAssets(ListAssociatedAssetsRequest request) {
request = beforeClientExecution(request);
return executeListAssociatedAssets(request);
}
@SdkInternalApi
final ListAssociatedAssetsResult executeListAssociatedAssets(ListAssociatedAssetsRequest listAssociatedAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(listAssociatedAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListAssociatedAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAssociatedAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAssociatedAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAssociatedAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of bulk import job requests. For more information, see List bulk import jobs
* (CLI) in the IoT SiteWise User Guide.
*
*
* @param listBulkImportJobsRequest
* @return Result of the ListBulkImportJobs operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListBulkImportJobs
* @see AWS
* API Documentation
*/
@Override
public ListBulkImportJobsResult listBulkImportJobs(ListBulkImportJobsRequest request) {
request = beforeClientExecution(request);
return executeListBulkImportJobs(request);
}
@SdkInternalApi
final ListBulkImportJobsResult executeListBulkImportJobs(ListBulkImportJobsRequest listBulkImportJobsRequest) {
ExecutionContext executionContext = createExecutionContext(listBulkImportJobsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListBulkImportJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBulkImportJobsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBulkImportJobs");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "data.";
String resolvedHostPrefix = String.format("data.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBulkImportJobsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of dashboards for an IoT SiteWise Monitor project.
*
*
* @param listDashboardsRequest
* @return Result of the ListDashboards operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListDashboards
* @see AWS API
* Documentation
*/
@Override
public ListDashboardsResult listDashboards(ListDashboardsRequest request) {
request = beforeClientExecution(request);
return executeListDashboards(request);
}
@SdkInternalApi
final ListDashboardsResult executeListDashboards(ListDashboardsRequest listDashboardsRequest) {
ExecutionContext executionContext = createExecutionContext(listDashboardsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDashboardsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDashboardsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDashboards");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDashboardsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of gateways.
*
*
* @param listGatewaysRequest
* @return Result of the ListGateways operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListGateways
* @see AWS API
* Documentation
*/
@Override
public ListGatewaysResult listGateways(ListGatewaysRequest request) {
request = beforeClientExecution(request);
return executeListGateways(request);
}
@SdkInternalApi
final ListGatewaysResult executeListGateways(ListGatewaysRequest listGatewaysRequest) {
ExecutionContext executionContext = createExecutionContext(listGatewaysRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListGatewaysRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listGatewaysRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListGateways");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListGatewaysResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of IoT SiteWise Monitor portals.
*
*
* @param listPortalsRequest
* @return Result of the ListPortals operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListPortals
* @see AWS API
* Documentation
*/
@Override
public ListPortalsResult listPortals(ListPortalsRequest request) {
request = beforeClientExecution(request);
return executeListPortals(request);
}
@SdkInternalApi
final ListPortalsResult executeListPortals(ListPortalsRequest listPortalsRequest) {
ExecutionContext executionContext = createExecutionContext(listPortalsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPortalsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPortalsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPortals");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPortalsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of assets associated with an IoT SiteWise Monitor project.
*
*
* @param listProjectAssetsRequest
* @return Result of the ListProjectAssets operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListProjectAssets
* @see AWS
* API Documentation
*/
@Override
public ListProjectAssetsResult listProjectAssets(ListProjectAssetsRequest request) {
request = beforeClientExecution(request);
return executeListProjectAssets(request);
}
@SdkInternalApi
final ListProjectAssetsResult executeListProjectAssets(ListProjectAssetsRequest listProjectAssetsRequest) {
ExecutionContext executionContext = createExecutionContext(listProjectAssetsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListProjectAssetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listProjectAssetsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListProjectAssets");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListProjectAssetsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of projects for an IoT SiteWise Monitor portal.
*
*
* @param listProjectsRequest
* @return Result of the ListProjects operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListProjects
* @see AWS API
* Documentation
*/
@Override
public ListProjectsResult listProjects(ListProjectsRequest request) {
request = beforeClientExecution(request);
return executeListProjects(request);
}
@SdkInternalApi
final ListProjectsResult executeListProjects(ListProjectsRequest listProjectsRequest) {
ExecutionContext executionContext = createExecutionContext(listProjectsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListProjectsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listProjectsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListProjects");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListProjectsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves the list of tags for an IoT SiteWise resource.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws UnauthorizedException
* You are not authorized.
* @sample AWSIoTSiteWise.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) {
request = beforeClientExecution(request);
return executeListTagsForResource(request);
}
@SdkInternalApi
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Retrieves a paginated list of time series (data streams).
*
*
* @param listTimeSeriesRequest
* @return Result of the ListTimeSeries operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.ListTimeSeries
* @see AWS API
* Documentation
*/
@Override
public ListTimeSeriesResult listTimeSeries(ListTimeSeriesRequest request) {
request = beforeClientExecution(request);
return executeListTimeSeries(request);
}
@SdkInternalApi
final ListTimeSeriesResult executeListTimeSeries(ListTimeSeriesRequest listTimeSeriesRequest) {
ExecutionContext executionContext = createExecutionContext(listTimeSeriesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTimeSeriesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTimeSeriesRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTimeSeries");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTimeSeriesResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sets the default encryption configuration for the Amazon Web Services account. For more information, see Key management in the
* IoT SiteWise User Guide.
*
*
* @param putDefaultEncryptionConfigurationRequest
* @return Result of the PutDefaultEncryptionConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.PutDefaultEncryptionConfiguration
* @see AWS API Documentation
*/
@Override
public PutDefaultEncryptionConfigurationResult putDefaultEncryptionConfiguration(PutDefaultEncryptionConfigurationRequest request) {
request = beforeClientExecution(request);
return executePutDefaultEncryptionConfiguration(request);
}
@SdkInternalApi
final PutDefaultEncryptionConfigurationResult executePutDefaultEncryptionConfiguration(
PutDefaultEncryptionConfigurationRequest putDefaultEncryptionConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(putDefaultEncryptionConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutDefaultEncryptionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(putDefaultEncryptionConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutDefaultEncryptionConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new PutDefaultEncryptionConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Sets logging options for IoT SiteWise.
*
*
* @param putLoggingOptionsRequest
* @return Result of the PutLoggingOptions operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @sample AWSIoTSiteWise.PutLoggingOptions
* @see AWS
* API Documentation
*/
@Override
public PutLoggingOptionsResult putLoggingOptions(PutLoggingOptionsRequest request) {
request = beforeClientExecution(request);
return executePutLoggingOptions(request);
}
@SdkInternalApi
final PutLoggingOptionsResult executePutLoggingOptions(PutLoggingOptionsRequest putLoggingOptionsRequest) {
ExecutionContext executionContext = createExecutionContext(putLoggingOptionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutLoggingOptionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putLoggingOptionsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutLoggingOptions");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutLoggingOptionsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Configures storage settings for IoT SiteWise.
*
*
* @param putStorageConfigurationRequest
* @return Result of the PutStorageConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.PutStorageConfiguration
* @see AWS API Documentation
*/
@Override
public PutStorageConfigurationResult putStorageConfiguration(PutStorageConfigurationRequest request) {
request = beforeClientExecution(request);
return executePutStorageConfiguration(request);
}
@SdkInternalApi
final PutStorageConfigurationResult executePutStorageConfiguration(PutStorageConfigurationRequest putStorageConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(putStorageConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutStorageConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(putStorageConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutStorageConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new PutStorageConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds tags to an IoT SiteWise resource. If a tag already exists for the resource, this operation updates the tag's
* value.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws UnauthorizedException
* You are not authorized.
* @throws TooManyTagsException
* You've reached the limit for the number of tags allowed for a resource. For more information, see Tag naming limits
* and requirements in the Amazon Web Services General Reference.
* @sample AWSIoTSiteWise.TagResource
* @see AWS API
* Documentation
*/
@Override
public TagResourceResult tagResource(TagResourceRequest request) {
request = beforeClientExecution(request);
return executeTagResource(request);
}
@SdkInternalApi
final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes a tag from an IoT SiteWise resource.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws UnauthorizedException
* You are not authorized.
* @sample AWSIoTSiteWise.UntagResource
* @see AWS API
* Documentation
*/
@Override
public UntagResourceResult untagResource(UntagResourceRequest request) {
request = beforeClientExecution(request);
return executeUntagResource(request);
}
@SdkInternalApi
final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {
ExecutionContext executionContext = createExecutionContext(untagResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an existing access policy that specifies an identity's access to an IoT SiteWise Monitor portal or
* project resource.
*
*
* @param updateAccessPolicyRequest
* @return Result of the UpdateAccessPolicy operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.UpdateAccessPolicy
* @see AWS
* API Documentation
*/
@Override
public UpdateAccessPolicyResult updateAccessPolicy(UpdateAccessPolicyRequest request) {
request = beforeClientExecution(request);
return executeUpdateAccessPolicy(request);
}
@SdkInternalApi
final UpdateAccessPolicyResult executeUpdateAccessPolicy(UpdateAccessPolicyRequest updateAccessPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(updateAccessPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAccessPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAccessPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAccessPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAccessPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an asset's name. For more information, see Updating assets
* and models in the IoT SiteWise User Guide.
*
*
* @param updateAssetRequest
* @return Result of the UpdateAsset operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.UpdateAsset
* @see AWS API
* Documentation
*/
@Override
public UpdateAssetResult updateAsset(UpdateAssetRequest request) {
request = beforeClientExecution(request);
return executeUpdateAsset(request);
}
@SdkInternalApi
final UpdateAssetResult executeUpdateAsset(UpdateAssetRequest updateAssetRequest) {
ExecutionContext executionContext = createExecutionContext(updateAssetRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAssetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAssetRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAsset");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAssetResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an asset model and all of the assets that were created from the model. Each asset created from the model
* inherits the updated asset model's property and hierarchy definitions. For more information, see Updating assets
* and models in the IoT SiteWise User Guide.
*
*
*
* This operation overwrites the existing model with the provided model. To avoid deleting your asset model's
* properties or hierarchies, you must include their IDs and definitions in the updated asset model payload. For
* more information, see DescribeAssetModel.
*
*
* If you remove a property from an asset model, IoT SiteWise deletes all previous data for that property. If you
* remove a hierarchy definition from an asset model, IoT SiteWise disassociates every asset associated with that
* hierarchy. You can't change the type or data type of an existing property.
*
*
*
* @param updateAssetModelRequest
* @return Result of the UpdateAssetModel operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.UpdateAssetModel
* @see AWS
* API Documentation
*/
@Override
public UpdateAssetModelResult updateAssetModel(UpdateAssetModelRequest request) {
request = beforeClientExecution(request);
return executeUpdateAssetModel(request);
}
@SdkInternalApi
final UpdateAssetModelResult executeUpdateAssetModel(UpdateAssetModelRequest updateAssetModelRequest) {
ExecutionContext executionContext = createExecutionContext(updateAssetModelRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAssetModelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAssetModelRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAssetModel");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAssetModelResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an asset property's alias and notification state.
*
*
*
* This operation overwrites the property's existing alias and notification state. To keep your existing property's
* alias or notification state, you must include the existing values in the UpdateAssetProperty request. For more
* information, see DescribeAssetProperty.
*
*
*
* @param updateAssetPropertyRequest
* @return Result of the UpdateAssetProperty operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.UpdateAssetProperty
* @see AWS API Documentation
*/
@Override
public UpdateAssetPropertyResult updateAssetProperty(UpdateAssetPropertyRequest request) {
request = beforeClientExecution(request);
return executeUpdateAssetProperty(request);
}
@SdkInternalApi
final UpdateAssetPropertyResult executeUpdateAssetProperty(UpdateAssetPropertyRequest updateAssetPropertyRequest) {
ExecutionContext executionContext = createExecutionContext(updateAssetPropertyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateAssetPropertyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAssetPropertyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAssetProperty");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAssetPropertyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an IoT SiteWise Monitor dashboard.
*
*
* @param updateDashboardRequest
* @return Result of the UpdateDashboard operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.UpdateDashboard
* @see AWS
* API Documentation
*/
@Override
public UpdateDashboardResult updateDashboard(UpdateDashboardRequest request) {
request = beforeClientExecution(request);
return executeUpdateDashboard(request);
}
@SdkInternalApi
final UpdateDashboardResult executeUpdateDashboard(UpdateDashboardRequest updateDashboardRequest) {
ExecutionContext executionContext = createExecutionContext(updateDashboardRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateDashboardRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateDashboardRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDashboard");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDashboardResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a gateway's name.
*
*
* @param updateGatewayRequest
* @return Result of the UpdateGateway operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.UpdateGateway
* @see AWS API
* Documentation
*/
@Override
public UpdateGatewayResult updateGateway(UpdateGatewayRequest request) {
request = beforeClientExecution(request);
return executeUpdateGateway(request);
}
@SdkInternalApi
final UpdateGatewayResult executeUpdateGateway(UpdateGatewayRequest updateGatewayRequest) {
ExecutionContext executionContext = createExecutionContext(updateGatewayRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateGatewayRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateGatewayRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateGateway");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateGatewayResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates a gateway capability configuration or defines a new capability configuration. Each gateway capability
* defines data sources for a gateway. A capability configuration can contain multiple data source configurations.
* If you define OPC-UA sources for a gateway in the IoT SiteWise console, all of your OPC-UA sources are stored in
* one capability configuration. To list all capability configurations for a gateway, use DescribeGateway.
*
*
* @param updateGatewayCapabilityConfigurationRequest
* @return Result of the UpdateGatewayCapabilityConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws LimitExceededException
* You've reached the limit for a resource. For example, this can occur if you're trying to associate more
* than the allowed number of child assets or attempting to create more than the allowed number of
* properties for an asset model.
*
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.UpdateGatewayCapabilityConfiguration
* @see AWS API Documentation
*/
@Override
public UpdateGatewayCapabilityConfigurationResult updateGatewayCapabilityConfiguration(UpdateGatewayCapabilityConfigurationRequest request) {
request = beforeClientExecution(request);
return executeUpdateGatewayCapabilityConfiguration(request);
}
@SdkInternalApi
final UpdateGatewayCapabilityConfigurationResult executeUpdateGatewayCapabilityConfiguration(
UpdateGatewayCapabilityConfigurationRequest updateGatewayCapabilityConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(updateGatewayCapabilityConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateGatewayCapabilityConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(updateGatewayCapabilityConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateGatewayCapabilityConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "api.";
String resolvedHostPrefix = String.format("api.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateGatewayCapabilityConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an IoT SiteWise Monitor portal.
*
*
* @param updatePortalRequest
* @return Result of the UpdatePortal operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @throws ConflictingOperationException
* Your request has conflicting operations. This can occur if you're trying to perform more than one
* operation on the same resource at the same time.
* @sample AWSIoTSiteWise.UpdatePortal
* @see AWS API
* Documentation
*/
@Override
public UpdatePortalResult updatePortal(UpdatePortalRequest request) {
request = beforeClientExecution(request);
return executeUpdatePortal(request);
}
@SdkInternalApi
final UpdatePortalResult executeUpdatePortal(UpdatePortalRequest updatePortalRequest) {
ExecutionContext executionContext = createExecutionContext(updatePortalRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdatePortalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updatePortalRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePortal");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePortalResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Updates an IoT SiteWise Monitor project.
*
*
* @param updateProjectRequest
* @return Result of the UpdateProject operation returned by the service.
* @throws InvalidRequestException
* The request isn't valid. This can occur if your request contains malformed JSON or unsupported
* characters. Check your request and try again.
* @throws ResourceNotFoundException
* The requested resource can't be found.
* @throws InternalFailureException
* IoT SiteWise can't process your request right now. Try again later.
* @throws ThrottlingException
* Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise
* assets that can be created per second, the allowed number of messages per second, and so on.
*
* For more information, see Quotas in the IoT
* SiteWise User Guide.
* @sample AWSIoTSiteWise.UpdateProject
* @see AWS API
* Documentation
*/
@Override
public UpdateProjectResult updateProject(UpdateProjectRequest request) {
request = beforeClientExecution(request);
return executeUpdateProject(request);
}
@SdkInternalApi
final UpdateProjectResult executeUpdateProject(UpdateProjectRequest updateProjectRequest) {
ExecutionContext executionContext = createExecutionContext(updateProjectRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new UpdateProjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateProjectRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoTSiteWise");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateProject");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
URI endpointTraitHost = null;
if (!clientConfiguration.isDisableHostPrefixInjection()) {
String hostPrefix = "monitor.";
String resolvedHostPrefix = String.format("monitor.");
endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateProjectResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
* Returns additional metadata for a previously executed successful, request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext) {
return invoke(request, responseHandler, executionContext, null, null);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private Response invoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
}
/**
* Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
* be ignored for this operation.
**/
private Response anonymousInvoke(Request request,
HttpResponseHandler> responseHandler, ExecutionContext executionContext) {
return doInvoke(request, responseHandler, executionContext, null, null);
}
/**
* Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
* ExecutionContext beforehand.
**/
private Response doInvoke(Request request, HttpResponseHandler> responseHandler,
ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
if (discoveredEndpoint != null) {
request.setEndpoint(discoveredEndpoint);
request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
} else if (uriFromEndpointTrait != null) {
request.setEndpoint(uriFromEndpointTrait);
} else {
request.setEndpoint(endpoint);
}
request.setTimeOffset(timeOffset);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
return client.execute(request, responseHandler, errorResponseHandler, executionContext);
}
@com.amazonaws.annotation.SdkInternalApi
static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() {
return protocolFactory;
}
@Override
public AWSIoTSiteWiseWaiters waiters() {
if (waiters == null) {
synchronized (this) {
if (waiters == null) {
waiters = new AWSIoTSiteWiseWaiters(this);
}
}
}
return waiters;
}
@Override
public void shutdown() {
super.shutdown();
if (waiters != null) {
waiters.shutdown();
}
}
}