
com.amazonaws.services.iot.AWSIotClient Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.iot;
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.iot.AWSIotClientBuilder;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.iot.model.*;
import com.amazonaws.services.iot.model.transform.*;
/**
* Client for accessing AWS IoT. All service calls made using this client are blocking, and will not return until the
* service call completes.
*
* AWS IoT
*
* AWS IoT provides secure, bi-directional communication between Internet-connected devices (such as sensors, actuators,
* embedded devices, or smart appliances) and the AWS cloud. You can discover your custom IoT-Data endpoint to
* communicate with, configure rules for data processing and integration with other services, organize resources
* associated with each device (Registry), configure logging, and create and manage policies and credentials to
* authenticate devices.
*
*
* The service endpoints that expose this API are listed in AWS IoT Core Endpoints and Quotas. You must
* use the endpoint for the region that has the resources you want to access.
*
*
* The service name used by AWS
* Signature Version 4 to sign the request is: execute-api.
*
*
* For more information about how AWS IoT works, see the Developer Guide.
*
*
* For information about how to use the credentials provider for AWS IoT, see Authorizing Direct Calls to
* AWS Services.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSIotClient extends AmazonWebServiceClient implements AWSIot {
/** Provider for AWS credentials. */
private final AWSCredentialsProvider awsCredentialsProvider;
private static final Log log = LogFactory.getLog(AWSIot.class);
/** Default signing name for the service. */
private static final String DEFAULT_SIGNING_NAME = "execute-api";
/** 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("")
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalFailureException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InternalFailureExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.LimitExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TransferAlreadyCompletedException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.TransferAlreadyCompletedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("NotConfiguredException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.NotConfiguredExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ThrottlingExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("MalformedPolicyException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.MalformedPolicyExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidQueryException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InvalidQueryExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidStateTransitionException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InvalidStateTransitionExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceRegistrationFailureException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ResourceRegistrationFailureExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("DeleteConflictException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.DeleteConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InvalidRequestExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("CertificateConflictException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.CertificateConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("RegistrationCodeValidationException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.RegistrationCodeValidationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidResponseException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InvalidResponseExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidAggregationException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InvalidAggregationExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("SqlParseException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.SqlParseExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConflictingResourceUpdateException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ConflictingResourceUpdateExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ResourceAlreadyExistsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InternalException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.InternalExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("VersionsLimitExceededException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.VersionsLimitExceededExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TransferConflictException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.TransferConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("IndexNotReadyException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.IndexNotReadyExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("UnauthorizedException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.UnauthorizedExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("CertificateStateException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.CertificateStateExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("VersionConflictException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.VersionConflictExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("TaskAlreadyExistsException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.TaskAlreadyExistsExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance()))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("CertificateValidationException").withExceptionUnmarshaller(
com.amazonaws.services.iot.model.transform.CertificateValidationExceptionUnmarshaller.getInstance()))
.withBaseServiceExceptionClass(com.amazonaws.services.iot.model.AWSIotException.class));
/**
* Constructs a new client to invoke service methods on AWS IoT. A credentials provider chain will be used that
* searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @see DefaultAWSCredentialsProviderChain
* @deprecated use {@link AWSIotClientBuilder#defaultClient()}
*/
@Deprecated
public AWSIotClient() {
this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on AWS IoT. A credentials provider chain will be used that
* searches for credentials in this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2 metadata service
*
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param clientConfiguration
* The client configuration options controlling how this client connects to AWS IoT (ex: proxy settings,
* retry counts, etc.).
*
* @see DefaultAWSCredentialsProviderChain
* @deprecated use {@link AWSIotClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AWSIotClient(ClientConfiguration clientConfiguration) {
this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration);
}
/**
* Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @deprecated use {@link AWSIotClientBuilder#withCredentials(AWSCredentialsProvider)} for example:
* {@code AWSIotClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();}
*/
@Deprecated
public AWSIotClient(AWSCredentials awsCredentials) {
this(awsCredentials, configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials and
* client configuration options.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentials
* The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to AWS IoT (ex: proxy settings,
* retry counts, etc.).
* @deprecated use {@link AWSIotClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSIotClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AWSIotClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {
super(clientConfiguration);
this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials);
this.advancedConfig = AdvancedConfig.EMPTY;
init();
}
/**
* Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials
* provider.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @deprecated use {@link AWSIotClientBuilder#withCredentials(AWSCredentialsProvider)}
*/
@Deprecated
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, configFactory.getConfig());
}
/**
* Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials provider
* and client configuration options.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to AWS IoT (ex: proxy settings,
* retry counts, etc.).
* @deprecated use {@link AWSIotClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSIotClientBuilder#withClientConfiguration(ClientConfiguration)}
*/
@Deprecated
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, null);
}
/**
* Constructs a new client to invoke service methods on AWS IoT using the specified AWS account credentials
* provider, client configuration options, and request metric collector.
*
*
* All service calls made using this new client object are blocking, and will not return until the service call
* completes.
*
* @param awsCredentialsProvider
* The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
* @param clientConfiguration
* The client configuration options controlling how this client connects to AWS IoT (ex: proxy settings,
* retry counts, etc.).
* @param requestMetricCollector
* optional request metric collector
* @deprecated use {@link AWSIotClientBuilder#withCredentials(AWSCredentialsProvider)} and
* {@link AWSIotClientBuilder#withClientConfiguration(ClientConfiguration)} and
* {@link AWSIotClientBuilder#withMetricsCollector(RequestMetricCollector)}
*/
@Deprecated
public AWSIotClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) {
super(clientConfiguration, requestMetricCollector);
this.awsCredentialsProvider = awsCredentialsProvider;
this.advancedConfig = AdvancedConfig.EMPTY;
init();
}
public static AWSIotClientBuilder builder() {
return AWSIotClientBuilder.standard();
}
/**
* Constructs a new client to invoke service methods on AWS IoT 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.
*/
AWSIotClient(AwsSyncClientParams clientParams) {
this(clientParams, false);
}
/**
* Constructs a new client to invoke service methods on AWS IoT 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.
*/
AWSIotClient(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("https://iot.us-east-1.amazonaws.com");
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/iot/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/iot/request.handler2s"));
requestHandler2s.addAll(chainFactory.getGlobalHandlers());
}
/**
*
* Accepts a pending certificate transfer. The default state of the certificate is INACTIVE.
*
*
* To check for pending certificate transfers, call ListCertificates to enumerate your certificates.
*
*
* @param acceptCertificateTransferRequest
* The input for the AcceptCertificateTransfer operation.
* @return Result of the AcceptCertificateTransfer operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws TransferAlreadyCompletedException
* You can't revert the certificate transfer because the transfer is already complete.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.AcceptCertificateTransfer
*/
@Override
public AcceptCertificateTransferResult acceptCertificateTransfer(AcceptCertificateTransferRequest request) {
request = beforeClientExecution(request);
return executeAcceptCertificateTransfer(request);
}
@SdkInternalApi
final AcceptCertificateTransferResult executeAcceptCertificateTransfer(AcceptCertificateTransferRequest acceptCertificateTransferRequest) {
ExecutionContext executionContext = createExecutionContext(acceptCertificateTransferRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AcceptCertificateTransferRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(acceptCertificateTransferRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AcceptCertificateTransfer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AcceptCertificateTransferResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a thing to a billing group.
*
*
* @param addThingToBillingGroupRequest
* @return Result of the AddThingToBillingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.AddThingToBillingGroup
*/
@Override
public AddThingToBillingGroupResult addThingToBillingGroup(AddThingToBillingGroupRequest request) {
request = beforeClientExecution(request);
return executeAddThingToBillingGroup(request);
}
@SdkInternalApi
final AddThingToBillingGroupResult executeAddThingToBillingGroup(AddThingToBillingGroupRequest addThingToBillingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(addThingToBillingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddThingToBillingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addThingToBillingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddThingToBillingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AddThingToBillingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Adds a thing to a thing group.
*
*
* @param addThingToThingGroupRequest
* @return Result of the AddThingToThingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.AddThingToThingGroup
*/
@Override
public AddThingToThingGroupResult addThingToThingGroup(AddThingToThingGroupRequest request) {
request = beforeClientExecution(request);
return executeAddThingToThingGroup(request);
}
@SdkInternalApi
final AddThingToThingGroupResult executeAddThingToThingGroup(AddThingToThingGroupRequest addThingToThingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(addThingToThingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AddThingToThingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addThingToThingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddThingToThingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddThingToThingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Associates a group with a continuous job. The following criteria must be met:
*
*
* -
*
* The job must have been created with the targetSelection
field set to "CONTINUOUS".
*
*
* -
*
* The job status must currently be "IN_PROGRESS".
*
*
* -
*
* The total number of targets associated with a job must not exceed 100.
*
*
*
*
* @param associateTargetsWithJobRequest
* @return Result of the AssociateTargetsWithJob operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.AssociateTargetsWithJob
*/
@Override
public AssociateTargetsWithJobResult associateTargetsWithJob(AssociateTargetsWithJobRequest request) {
request = beforeClientExecution(request);
return executeAssociateTargetsWithJob(request);
}
@SdkInternalApi
final AssociateTargetsWithJobResult executeAssociateTargetsWithJob(AssociateTargetsWithJobRequest associateTargetsWithJobRequest) {
ExecutionContext executionContext = createExecutionContext(associateTargetsWithJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateTargetsWithJobRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(associateTargetsWithJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateTargetsWithJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociateTargetsWithJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches a policy to the specified target.
*
*
* @param attachPolicyRequest
* @return Result of the AttachPolicy operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws LimitExceededException
* A limit has been exceeded.
* @sample AWSIot.AttachPolicy
*/
@Override
public AttachPolicyResult attachPolicy(AttachPolicyRequest request) {
request = beforeClientExecution(request);
return executeAttachPolicy(request);
}
@SdkInternalApi
final AttachPolicyResult executeAttachPolicy(AttachPolicyRequest attachPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(attachPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AttachPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches the specified policy to the specified principal (certificate or other credential).
*
*
* Note: This API is deprecated. Please use AttachPolicy instead.
*
*
* @param attachPrincipalPolicyRequest
* The input for the AttachPrincipalPolicy operation.
* @return Result of the AttachPrincipalPolicy operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws LimitExceededException
* A limit has been exceeded.
* @sample AWSIot.AttachPrincipalPolicy
*/
@Override
@Deprecated
public AttachPrincipalPolicyResult attachPrincipalPolicy(AttachPrincipalPolicyRequest request) {
request = beforeClientExecution(request);
return executeAttachPrincipalPolicy(request);
}
@SdkInternalApi
final AttachPrincipalPolicyResult executeAttachPrincipalPolicy(AttachPrincipalPolicyRequest attachPrincipalPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(attachPrincipalPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachPrincipalPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachPrincipalPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachPrincipalPolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AttachPrincipalPolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Associates a Device Defender security profile with a thing group or this account. Each thing group or account can
* have up to five security profiles associated with it.
*
*
* @param attachSecurityProfileRequest
* @return Result of the AttachSecurityProfile operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.AttachSecurityProfile
*/
@Override
public AttachSecurityProfileResult attachSecurityProfile(AttachSecurityProfileRequest request) {
request = beforeClientExecution(request);
return executeAttachSecurityProfile(request);
}
@SdkInternalApi
final AttachSecurityProfileResult executeAttachSecurityProfile(AttachSecurityProfileRequest attachSecurityProfileRequest) {
ExecutionContext executionContext = createExecutionContext(attachSecurityProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachSecurityProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachSecurityProfileRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachSecurityProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AttachSecurityProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Attaches the specified principal to the specified thing. A principal can be X.509 certificates, IAM users,
* groups, and roles, Amazon Cognito identities or federated identities.
*
*
* @param attachThingPrincipalRequest
* The input for the AttachThingPrincipal operation.
* @return Result of the AttachThingPrincipal operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.AttachThingPrincipal
*/
@Override
public AttachThingPrincipalResult attachThingPrincipal(AttachThingPrincipalRequest request) {
request = beforeClientExecution(request);
return executeAttachThingPrincipal(request);
}
@SdkInternalApi
final AttachThingPrincipalResult executeAttachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest) {
ExecutionContext executionContext = createExecutionContext(attachThingPrincipalRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AttachThingPrincipalRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(attachThingPrincipalRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AttachThingPrincipal");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AttachThingPrincipalResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException
* occurs.
*
*
* @param cancelAuditMitigationActionsTaskRequest
* @return Result of the CancelAuditMitigationActionsTask operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CancelAuditMitigationActionsTask
*/
@Override
public CancelAuditMitigationActionsTaskResult cancelAuditMitigationActionsTask(CancelAuditMitigationActionsTaskRequest request) {
request = beforeClientExecution(request);
return executeCancelAuditMitigationActionsTask(request);
}
@SdkInternalApi
final CancelAuditMitigationActionsTaskResult executeCancelAuditMitigationActionsTask(
CancelAuditMitigationActionsTaskRequest cancelAuditMitigationActionsTaskRequest) {
ExecutionContext executionContext = createExecutionContext(cancelAuditMitigationActionsTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelAuditMitigationActionsTaskRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(cancelAuditMitigationActionsTaskRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelAuditMitigationActionsTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CancelAuditMitigationActionsTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Cancels an audit that is in progress. The audit can be either scheduled or on-demand. If the audit is not in
* progress, an "InvalidRequestException" occurs.
*
*
* @param cancelAuditTaskRequest
* @return Result of the CancelAuditTask operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CancelAuditTask
*/
@Override
public CancelAuditTaskResult cancelAuditTask(CancelAuditTaskRequest request) {
request = beforeClientExecution(request);
return executeCancelAuditTask(request);
}
@SdkInternalApi
final CancelAuditTaskResult executeCancelAuditTask(CancelAuditTaskRequest cancelAuditTaskRequest) {
ExecutionContext executionContext = createExecutionContext(cancelAuditTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelAuditTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelAuditTaskRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelAuditTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelAuditTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Cancels a pending transfer for the specified certificate.
*
*
* Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations
* can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the certificate to the source
* account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be
* cancelled.
*
*
* After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to
* INACTIVE.
*
*
* @param cancelCertificateTransferRequest
* The input for the CancelCertificateTransfer operation.
* @return Result of the CancelCertificateTransfer operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws TransferAlreadyCompletedException
* You can't revert the certificate transfer because the transfer is already complete.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CancelCertificateTransfer
*/
@Override
public CancelCertificateTransferResult cancelCertificateTransfer(CancelCertificateTransferRequest request) {
request = beforeClientExecution(request);
return executeCancelCertificateTransfer(request);
}
@SdkInternalApi
final CancelCertificateTransferResult executeCancelCertificateTransfer(CancelCertificateTransferRequest cancelCertificateTransferRequest) {
ExecutionContext executionContext = createExecutionContext(cancelCertificateTransferRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelCertificateTransferRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(cancelCertificateTransferRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelCertificateTransfer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CancelCertificateTransferResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Cancels a job.
*
*
* @param cancelJobRequest
* @return Result of the CancelJob operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.CancelJob
*/
@Override
public CancelJobResult cancelJob(CancelJobRequest request) {
request = beforeClientExecution(request);
return executeCancelJob(request);
}
@SdkInternalApi
final CancelJobResult executeCancelJob(CancelJobRequest cancelJobRequest) {
ExecutionContext executionContext = createExecutionContext(cancelJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Cancels the execution of a job for a given thing.
*
*
* @param cancelJobExecutionRequest
* @return Result of the CancelJobExecution operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws InvalidStateTransitionException
* An attempt was made to change to an invalid state, for example by deleting a job or a job execution which
* is "IN_PROGRESS" without setting the force
parameter.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @sample AWSIot.CancelJobExecution
*/
@Override
public CancelJobExecutionResult cancelJobExecution(CancelJobExecutionRequest request) {
request = beforeClientExecution(request);
return executeCancelJobExecution(request);
}
@SdkInternalApi
final CancelJobExecutionResult executeCancelJobExecution(CancelJobExecutionRequest cancelJobExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(cancelJobExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CancelJobExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelJobExecutionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelJobExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelJobExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Clears the default authorizer.
*
*
* @param clearDefaultAuthorizerRequest
* @return Result of the ClearDefaultAuthorizer operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.ClearDefaultAuthorizer
*/
@Override
public ClearDefaultAuthorizerResult clearDefaultAuthorizer(ClearDefaultAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeClearDefaultAuthorizer(request);
}
@SdkInternalApi
final ClearDefaultAuthorizerResult executeClearDefaultAuthorizer(ClearDefaultAuthorizerRequest clearDefaultAuthorizerRequest) {
ExecutionContext executionContext = createExecutionContext(clearDefaultAuthorizerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ClearDefaultAuthorizerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(clearDefaultAuthorizerRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ClearDefaultAuthorizer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ClearDefaultAuthorizerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Confirms a topic rule destination. When you create a rule requiring a destination, AWS IoT sends a confirmation
* message to the endpoint or base address you specify. The message includes a token which you pass back when
* calling ConfirmTopicRuleDestination
to confirm that you own or have access to the endpoint.
*
*
* @param confirmTopicRuleDestinationRequest
* @return Result of the ConfirmTopicRuleDestination operation returned by the service.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.ConfirmTopicRuleDestination
*/
@Override
public ConfirmTopicRuleDestinationResult confirmTopicRuleDestination(ConfirmTopicRuleDestinationRequest request) {
request = beforeClientExecution(request);
return executeConfirmTopicRuleDestination(request);
}
@SdkInternalApi
final ConfirmTopicRuleDestinationResult executeConfirmTopicRuleDestination(ConfirmTopicRuleDestinationRequest confirmTopicRuleDestinationRequest) {
ExecutionContext executionContext = createExecutionContext(confirmTopicRuleDestinationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ConfirmTopicRuleDestinationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(confirmTopicRuleDestinationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ConfirmTopicRuleDestination");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ConfirmTopicRuleDestinationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a Device Defender audit suppression.
*
*
* @param createAuditSuppressionRequest
* @return Result of the CreateAuditSuppression operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws LimitExceededException
* A limit has been exceeded.
* @sample AWSIot.CreateAuditSuppression
*/
@Override
public CreateAuditSuppressionResult createAuditSuppression(CreateAuditSuppressionRequest request) {
request = beforeClientExecution(request);
return executeCreateAuditSuppression(request);
}
@SdkInternalApi
final CreateAuditSuppressionResult executeCreateAuditSuppression(CreateAuditSuppressionRequest createAuditSuppressionRequest) {
ExecutionContext executionContext = createExecutionContext(createAuditSuppressionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAuditSuppressionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAuditSuppressionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAuditSuppression");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateAuditSuppressionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an authorizer.
*
*
* @param createAuthorizerRequest
* @return Result of the CreateAuthorizer operation returned by the service.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateAuthorizer
*/
@Override
public CreateAuthorizerResult createAuthorizer(CreateAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeCreateAuthorizer(request);
}
@SdkInternalApi
final CreateAuthorizerResult executeCreateAuthorizer(CreateAuthorizerRequest createAuthorizerRequest) {
ExecutionContext executionContext = createExecutionContext(createAuthorizerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateAuthorizerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAuthorizerRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAuthorizer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAuthorizerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a billing group.
*
*
* @param createBillingGroupRequest
* @return Result of the CreateBillingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateBillingGroup
*/
@Override
public CreateBillingGroupResult createBillingGroup(CreateBillingGroupRequest request) {
request = beforeClientExecution(request);
return executeCreateBillingGroup(request);
}
@SdkInternalApi
final CreateBillingGroupResult executeCreateBillingGroup(CreateBillingGroupRequest createBillingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(createBillingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateBillingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createBillingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBillingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateBillingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an X.509 certificate using the specified certificate signing request.
*
*
* Note: The CSR must include a public key that is either an RSA key with a length of at least 2048 bits or
* an ECC key from NIST P-256 or NIST P-384 curves.
*
*
* Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.
*
*
* You can create multiple certificates in a batch by creating a directory, copying multiple .csr files into that
* directory, and then specifying that directory on the command line. The following commands show how to create a
* batch of certificates given a batch of CSRs.
*
*
* Assuming a set of CSRs are located inside of the directory my-csr-directory:
*
*
* On Linux and OS X, the command is:
*
*
* $ ls my-csr-directory/ | xargs -I {} aws iot create-certificate-from-csr --certificate-signing-request
* file://my-csr-directory/{}
*
*
* This command lists all of the CSRs in my-csr-directory and pipes each CSR file name to the aws iot
* create-certificate-from-csr AWS CLI command to create a certificate for the corresponding CSR.
*
*
* The aws iot create-certificate-from-csr part of the command can also be run in parallel to speed up the
* certificate creation process:
*
*
* $ ls my-csr-directory/ | xargs -P 10 -I {} aws iot create-certificate-from-csr --certificate-signing-request
* file://my-csr-directory/{}
*
*
* On Windows PowerShell, the command to create certificates for all CSRs in my-csr-directory is:
*
*
* > ls -Name my-csr-directory | %{aws iot create-certificate-from-csr --certificate-signing-request
* file://my-csr-directory/$_}
*
*
* On a Windows command prompt, the command to create certificates for all CSRs in my-csr-directory is:
*
*
* > forfiles /p my-csr-directory /c
* "cmd /c aws iot create-certificate-from-csr --certificate-signing-request file://@path"
*
*
* @param createCertificateFromCsrRequest
* The input for the CreateCertificateFromCsr operation.
* @return Result of the CreateCertificateFromCsr operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateCertificateFromCsr
*/
@Override
public CreateCertificateFromCsrResult createCertificateFromCsr(CreateCertificateFromCsrRequest request) {
request = beforeClientExecution(request);
return executeCreateCertificateFromCsr(request);
}
@SdkInternalApi
final CreateCertificateFromCsrResult executeCreateCertificateFromCsr(CreateCertificateFromCsrRequest createCertificateFromCsrRequest) {
ExecutionContext executionContext = createExecutionContext(createCertificateFromCsrRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateCertificateFromCsrRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createCertificateFromCsrRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCertificateFromCsr");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateCertificateFromCsrResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Create a dimension that you can use to limit the scope of a metric used in a security profile for AWS IoT Device
* Defender. For example, using a TOPIC_FILTER
dimension, you can narrow down the scope of the metric
* only to MQTT topics whose name match the pattern specified in the dimension.
*
*
* @param createDimensionRequest
* @return Result of the CreateDimension operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.CreateDimension
*/
@Override
public CreateDimensionResult createDimension(CreateDimensionRequest request) {
request = beforeClientExecution(request);
return executeCreateDimension(request);
}
@SdkInternalApi
final CreateDimensionResult executeCreateDimension(CreateDimensionRequest createDimensionRequest) {
ExecutionContext executionContext = createExecutionContext(createDimensionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDimensionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDimensionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDimension");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDimensionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a domain configuration.
*
*
*
* The domain configuration feature is in public preview and is subject to change.
*
*
*
* @param createDomainConfigurationRequest
* @return Result of the CreateDomainConfiguration operation returned by the service.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws CertificateValidationException
* The certificate is invalid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.CreateDomainConfiguration
*/
@Override
public CreateDomainConfigurationResult createDomainConfiguration(CreateDomainConfigurationRequest request) {
request = beforeClientExecution(request);
return executeCreateDomainConfiguration(request);
}
@SdkInternalApi
final CreateDomainConfigurationResult executeCreateDomainConfiguration(CreateDomainConfigurationRequest createDomainConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(createDomainConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDomainConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createDomainConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDomainConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateDomainConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a dynamic thing group.
*
*
* @param createDynamicThingGroupRequest
* @return Result of the CreateDynamicThingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidQueryException
* The query is invalid.
* @throws LimitExceededException
* A limit has been exceeded.
* @sample AWSIot.CreateDynamicThingGroup
*/
@Override
public CreateDynamicThingGroupResult createDynamicThingGroup(CreateDynamicThingGroupRequest request) {
request = beforeClientExecution(request);
return executeCreateDynamicThingGroup(request);
}
@SdkInternalApi
final CreateDynamicThingGroupResult executeCreateDynamicThingGroup(CreateDynamicThingGroupRequest createDynamicThingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(createDynamicThingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateDynamicThingGroupRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createDynamicThingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDynamicThingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateDynamicThingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a job.
*
*
* @param createJobRequest
* @return Result of the CreateJob operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.CreateJob
*/
@Override
public CreateJobResult createJob(CreateJobRequest request) {
request = beforeClientExecution(request);
return executeCreateJob(request);
}
@SdkInternalApi
final CreateJobResult executeCreateJob(CreateJobRequest createJobRequest) {
ExecutionContext executionContext = createExecutionContext(createJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key. You can also call
* CreateKeysAndCertificate
over MQTT from a device, for more information, see Provisioning MQTT API.
*
*
* Note This is the only time AWS IoT issues the private key for this certificate, so it is important to keep
* it in a secure location.
*
*
* @param createKeysAndCertificateRequest
* The input for the CreateKeysAndCertificate operation.
* @return Result of the CreateKeysAndCertificate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateKeysAndCertificate
*/
@Override
public CreateKeysAndCertificateResult createKeysAndCertificate(CreateKeysAndCertificateRequest request) {
request = beforeClientExecution(request);
return executeCreateKeysAndCertificate(request);
}
@SdkInternalApi
final CreateKeysAndCertificateResult executeCreateKeysAndCertificate(CreateKeysAndCertificateRequest createKeysAndCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(createKeysAndCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateKeysAndCertificateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createKeysAndCertificateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateKeysAndCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateKeysAndCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask. Only certain
* types of mitigation actions can be applied to specific check names. For more information, see Mitigation
* actions. Each mitigation action can apply only one type of change.
*
*
* @param createMitigationActionRequest
* @return Result of the CreateMitigationAction operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateMitigationAction
*/
@Override
public CreateMitigationActionResult createMitigationAction(CreateMitigationActionRequest request) {
request = beforeClientExecution(request);
return executeCreateMitigationAction(request);
}
@SdkInternalApi
final CreateMitigationActionResult executeCreateMitigationAction(CreateMitigationActionRequest createMitigationActionRequest) {
ExecutionContext executionContext = createExecutionContext(createMitigationActionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateMitigationActionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createMitigationActionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateMitigationAction");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateMitigationActionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an AWS IoT OTAUpdate on a target group of things or groups.
*
*
* @param createOTAUpdateRequest
* @return Result of the CreateOTAUpdate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.CreateOTAUpdate
*/
@Override
public CreateOTAUpdateResult createOTAUpdate(CreateOTAUpdateRequest request) {
request = beforeClientExecution(request);
return executeCreateOTAUpdate(request);
}
@SdkInternalApi
final CreateOTAUpdateResult executeCreateOTAUpdate(CreateOTAUpdateRequest createOTAUpdateRequest) {
ExecutionContext executionContext = createExecutionContext(createOTAUpdateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateOTAUpdateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createOTAUpdateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateOTAUpdate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateOTAUpdateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates an AWS IoT policy.
*
*
* The created policy is the default version for the policy. This operation creates a policy version with a version
* identifier of 1 and sets 1 as the policy's default version.
*
*
* @param createPolicyRequest
* The input for the CreatePolicy operation.
* @return Result of the CreatePolicy operation returned by the service.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws MalformedPolicyException
* The policy documentation is not valid.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreatePolicy
*/
@Override
public CreatePolicyResult createPolicy(CreatePolicyRequest request) {
request = beforeClientExecution(request);
return executeCreatePolicy(request);
}
@SdkInternalApi
final CreatePolicyResult executeCreatePolicy(CreatePolicyRequest createPolicyRequest) {
ExecutionContext executionContext = createExecutionContext(createPolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreatePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new version of the specified AWS IoT policy. To update a policy, create a new policy version. A managed
* policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to
* delete an existing version before you create a new one.
*
*
* Optionally, you can set the new version as the policy's default version. The default version is the operative
* version (that is, the version that is in effect for the certificates to which the policy is attached).
*
*
* @param createPolicyVersionRequest
* The input for the CreatePolicyVersion operation.
* @return Result of the CreatePolicyVersion operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws MalformedPolicyException
* The policy documentation is not valid.
* @throws VersionsLimitExceededException
* The number of policy versions exceeds the limit.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreatePolicyVersion
*/
@Override
public CreatePolicyVersionResult createPolicyVersion(CreatePolicyVersionRequest request) {
request = beforeClientExecution(request);
return executeCreatePolicyVersion(request);
}
@SdkInternalApi
final CreatePolicyVersionResult executeCreatePolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest) {
ExecutionContext executionContext = createExecutionContext(createPolicyVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreatePolicyVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPolicyVersionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePolicyVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePolicyVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a provisioning claim.
*
*
* @param createProvisioningClaimRequest
* @return Result of the CreateProvisioningClaim operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateProvisioningClaim
*/
@Override
public CreateProvisioningClaimResult createProvisioningClaim(CreateProvisioningClaimRequest request) {
request = beforeClientExecution(request);
return executeCreateProvisioningClaim(request);
}
@SdkInternalApi
final CreateProvisioningClaimResult executeCreateProvisioningClaim(CreateProvisioningClaimRequest createProvisioningClaimRequest) {
ExecutionContext executionContext = createExecutionContext(createProvisioningClaimRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateProvisioningClaimRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createProvisioningClaimRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProvisioningClaim");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateProvisioningClaimResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a fleet provisioning template.
*
*
* @param createProvisioningTemplateRequest
* @return Result of the CreateProvisioningTemplate operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @sample AWSIot.CreateProvisioningTemplate
*/
@Override
public CreateProvisioningTemplateResult createProvisioningTemplate(CreateProvisioningTemplateRequest request) {
request = beforeClientExecution(request);
return executeCreateProvisioningTemplate(request);
}
@SdkInternalApi
final CreateProvisioningTemplateResult executeCreateProvisioningTemplate(CreateProvisioningTemplateRequest createProvisioningTemplateRequest) {
ExecutionContext executionContext = createExecutionContext(createProvisioningTemplateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateProvisioningTemplateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createProvisioningTemplateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProvisioningTemplate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateProvisioningTemplateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new version of a fleet provisioning template.
*
*
* @param createProvisioningTemplateVersionRequest
* @return Result of the CreateProvisioningTemplateVersion operation returned by the service.
* @throws VersionsLimitExceededException
* The number of policy versions exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.CreateProvisioningTemplateVersion
*/
@Override
public CreateProvisioningTemplateVersionResult createProvisioningTemplateVersion(CreateProvisioningTemplateVersionRequest request) {
request = beforeClientExecution(request);
return executeCreateProvisioningTemplateVersion(request);
}
@SdkInternalApi
final CreateProvisioningTemplateVersionResult executeCreateProvisioningTemplateVersion(
CreateProvisioningTemplateVersionRequest createProvisioningTemplateVersionRequest) {
ExecutionContext executionContext = createExecutionContext(createProvisioningTemplateVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateProvisioningTemplateVersionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createProvisioningTemplateVersionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateProvisioningTemplateVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateProvisioningTemplateVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a role alias.
*
*
* @param createRoleAliasRequest
* @return Result of the CreateRoleAlias operation returned by the service.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateRoleAlias
*/
@Override
public CreateRoleAliasResult createRoleAlias(CreateRoleAliasRequest request) {
request = beforeClientExecution(request);
return executeCreateRoleAlias(request);
}
@SdkInternalApi
final CreateRoleAliasResult executeCreateRoleAlias(CreateRoleAliasRequest createRoleAliasRequest) {
ExecutionContext executionContext = createExecutionContext(createRoleAliasRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRoleAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createRoleAliasRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateRoleAlias");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateRoleAliasResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a scheduled audit that is run at a specified time interval.
*
*
* @param createScheduledAuditRequest
* @return Result of the CreateScheduledAudit operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws LimitExceededException
* A limit has been exceeded.
* @sample AWSIot.CreateScheduledAudit
*/
@Override
public CreateScheduledAuditResult createScheduledAudit(CreateScheduledAuditRequest request) {
request = beforeClientExecution(request);
return executeCreateScheduledAudit(request);
}
@SdkInternalApi
final CreateScheduledAuditResult executeCreateScheduledAudit(CreateScheduledAuditRequest createScheduledAuditRequest) {
ExecutionContext executionContext = createExecutionContext(createScheduledAuditRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateScheduledAuditRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createScheduledAuditRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateScheduledAudit");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateScheduledAuditResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a Device Defender security profile.
*
*
* @param createSecurityProfileRequest
* @return Result of the CreateSecurityProfile operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateSecurityProfile
*/
@Override
public CreateSecurityProfileResult createSecurityProfile(CreateSecurityProfileRequest request) {
request = beforeClientExecution(request);
return executeCreateSecurityProfile(request);
}
@SdkInternalApi
final CreateSecurityProfileResult executeCreateSecurityProfile(CreateSecurityProfileRequest createSecurityProfileRequest) {
ExecutionContext executionContext = createExecutionContext(createSecurityProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateSecurityProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSecurityProfileRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateSecurityProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateSecurityProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in
* chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with
* a stream.
*
*
* @param createStreamRequest
* @return Result of the CreateStream operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateStream
*/
@Override
public CreateStreamResult createStream(CreateStreamRequest request) {
request = beforeClientExecution(request);
return executeCreateStream(request);
}
@SdkInternalApi
final CreateStreamResult executeCreateStream(CreateStreamRequest createStreamRequest) {
ExecutionContext executionContext = createExecutionContext(createStreamRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createStreamRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateStream");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateStreamResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a thing record in the registry. If this call is made multiple times using the same thing name and
* configuration, the call will succeed. If this call is made with the same thing name but different configuration a
* ResourceAlreadyExistsException
is thrown.
*
*
*
* This is a control plane operation. See Authorization for
* information about authorizing control plane actions.
*
*
*
* @param createThingRequest
* The input for the CreateThing operation.
* @return Result of the CreateThing operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.CreateThing
*/
@Override
public CreateThingResult createThing(CreateThingRequest request) {
request = beforeClientExecution(request);
return executeCreateThing(request);
}
@SdkInternalApi
final CreateThingResult executeCreateThing(CreateThingRequest createThingRequest) {
ExecutionContext executionContext = createExecutionContext(createThingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateThingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createThingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateThing");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateThingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Create a thing group.
*
*
*
* This is a control plane operation. See Authorization for
* information about authorizing control plane actions.
*
*
*
* @param createThingGroupRequest
* @return Result of the CreateThingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.CreateThingGroup
*/
@Override
public CreateThingGroupResult createThingGroup(CreateThingGroupRequest request) {
request = beforeClientExecution(request);
return executeCreateThingGroup(request);
}
@SdkInternalApi
final CreateThingGroupResult executeCreateThingGroup(CreateThingGroupRequest createThingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(createThingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateThingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createThingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateThingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateThingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a new thing type.
*
*
* @param createThingTypeRequest
* The input for the CreateThingType operation.
* @return Result of the CreateThingType operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @sample AWSIot.CreateThingType
*/
@Override
public CreateThingTypeResult createThingType(CreateThingTypeRequest request) {
request = beforeClientExecution(request);
return executeCreateThingType(request);
}
@SdkInternalApi
final CreateThingTypeResult executeCreateThingType(CreateThingTypeRequest createThingTypeRequest) {
ExecutionContext executionContext = createExecutionContext(createThingTypeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateThingTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createThingTypeRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateThingType");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateThingTypeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will
* be able to access data processed by the rule.
*
*
* @param createTopicRuleRequest
* The input for the CreateTopicRule operation.
* @return Result of the CreateTopicRule operation returned by the service.
* @throws SqlParseException
* The Rule-SQL expression can't be parsed correctly.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.CreateTopicRule
*/
@Override
public CreateTopicRuleResult createTopicRule(CreateTopicRuleRequest request) {
request = beforeClientExecution(request);
return executeCreateTopicRule(request);
}
@SdkInternalApi
final CreateTopicRuleResult executeCreateTopicRule(CreateTopicRuleRequest createTopicRuleRequest) {
ExecutionContext executionContext = createExecutionContext(createTopicRuleRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTopicRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTopicRuleRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTopicRule");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTopicRuleResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Creates a topic rule destination. The destination must be confirmed prior to use.
*
*
* @param createTopicRuleDestinationRequest
* @return Result of the CreateTopicRuleDestination operation returned by the service.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceAlreadyExistsException
* The resource already exists.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.CreateTopicRuleDestination
*/
@Override
public CreateTopicRuleDestinationResult createTopicRuleDestination(CreateTopicRuleDestinationRequest request) {
request = beforeClientExecution(request);
return executeCreateTopicRuleDestination(request);
}
@SdkInternalApi
final CreateTopicRuleDestinationResult executeCreateTopicRuleDestination(CreateTopicRuleDestinationRequest createTopicRuleDestinationRequest) {
ExecutionContext executionContext = createExecutionContext(createTopicRuleDestinationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTopicRuleDestinationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(createTopicRuleDestinationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTopicRuleDestination");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateTopicRuleDestinationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Restores the default settings for Device Defender audits for this account. Any configuration data you entered is
* deleted and all audit checks are reset to disabled.
*
*
* @param deleteAccountAuditConfigurationRequest
* @return Result of the DeleteAccountAuditConfiguration operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteAccountAuditConfiguration
*/
@Override
public DeleteAccountAuditConfigurationResult deleteAccountAuditConfiguration(DeleteAccountAuditConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteAccountAuditConfiguration(request);
}
@SdkInternalApi
final DeleteAccountAuditConfigurationResult executeDeleteAccountAuditConfiguration(
DeleteAccountAuditConfigurationRequest deleteAccountAuditConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAccountAuditConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAccountAuditConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteAccountAuditConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAccountAuditConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteAccountAuditConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a Device Defender audit suppression.
*
*
* @param deleteAuditSuppressionRequest
* @return Result of the DeleteAuditSuppression operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteAuditSuppression
*/
@Override
public DeleteAuditSuppressionResult deleteAuditSuppression(DeleteAuditSuppressionRequest request) {
request = beforeClientExecution(request);
return executeDeleteAuditSuppression(request);
}
@SdkInternalApi
final DeleteAuditSuppressionResult executeDeleteAuditSuppression(DeleteAuditSuppressionRequest deleteAuditSuppressionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAuditSuppressionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAuditSuppressionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAuditSuppressionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAuditSuppression");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteAuditSuppressionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes an authorizer.
*
*
* @param deleteAuthorizerRequest
* @return Result of the DeleteAuthorizer operation returned by the service.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteAuthorizer
*/
@Override
public DeleteAuthorizerResult deleteAuthorizer(DeleteAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeDeleteAuthorizer(request);
}
@SdkInternalApi
final DeleteAuthorizerResult executeDeleteAuthorizer(DeleteAuthorizerRequest deleteAuthorizerRequest) {
ExecutionContext executionContext = createExecutionContext(deleteAuthorizerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteAuthorizerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAuthorizerRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAuthorizer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAuthorizerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the billing group.
*
*
* @param deleteBillingGroupRequest
* @return Result of the DeleteBillingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteBillingGroup
*/
@Override
public DeleteBillingGroupResult deleteBillingGroup(DeleteBillingGroupRequest request) {
request = beforeClientExecution(request);
return executeDeleteBillingGroup(request);
}
@SdkInternalApi
final DeleteBillingGroupResult executeDeleteBillingGroup(DeleteBillingGroupRequest deleteBillingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(deleteBillingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteBillingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteBillingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBillingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteBillingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a registered CA certificate.
*
*
* @param deleteCACertificateRequest
* Input for the DeleteCACertificate operation.
* @return Result of the DeleteCACertificate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws CertificateStateException
* The certificate operation is not allowed.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DeleteCACertificate
*/
@Override
public DeleteCACertificateResult deleteCACertificate(DeleteCACertificateRequest request) {
request = beforeClientExecution(request);
return executeDeleteCACertificate(request);
}
@SdkInternalApi
final DeleteCACertificateResult executeDeleteCACertificate(DeleteCACertificateRequest deleteCACertificateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteCACertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteCACertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCACertificateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCACertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCACertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified certificate.
*
*
* A certificate cannot be deleted if it has a policy or IoT thing attached to it or if its status is set to ACTIVE.
* To delete a certificate, first use the DetachPrincipalPolicy API to detach all policies. Next, use the
* UpdateCertificate API to set the certificate to the INACTIVE status.
*
*
* @param deleteCertificateRequest
* The input for the DeleteCertificate operation.
* @return Result of the DeleteCertificate operation returned by the service.
* @throws CertificateStateException
* The certificate operation is not allowed.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DeleteCertificate
*/
@Override
public DeleteCertificateResult deleteCertificate(DeleteCertificateRequest request) {
request = beforeClientExecution(request);
return executeDeleteCertificate(request);
}
@SdkInternalApi
final DeleteCertificateResult executeDeleteCertificate(DeleteCertificateRequest deleteCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteCertificateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Removes the specified dimension from your AWS account.
*
*
* @param deleteDimensionRequest
* @return Result of the DeleteDimension operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.DeleteDimension
*/
@Override
public DeleteDimensionResult deleteDimension(DeleteDimensionRequest request) {
request = beforeClientExecution(request);
return executeDeleteDimension(request);
}
@SdkInternalApi
final DeleteDimensionResult executeDeleteDimension(DeleteDimensionRequest deleteDimensionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDimensionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDimensionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteDimensionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDimension");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDimensionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified domain configuration.
*
*
*
* The domain configuration feature is in public preview and is subject to change.
*
*
*
* @param deleteDomainConfigurationRequest
* @return Result of the DeleteDomainConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @sample AWSIot.DeleteDomainConfiguration
*/
@Override
public DeleteDomainConfigurationResult deleteDomainConfiguration(DeleteDomainConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDeleteDomainConfiguration(request);
}
@SdkInternalApi
final DeleteDomainConfigurationResult executeDeleteDomainConfiguration(DeleteDomainConfigurationRequest deleteDomainConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDomainConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDomainConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteDomainConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDomainConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteDomainConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a dynamic thing group.
*
*
* @param deleteDynamicThingGroupRequest
* @return Result of the DeleteDynamicThingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteDynamicThingGroup
*/
@Override
public DeleteDynamicThingGroupResult deleteDynamicThingGroup(DeleteDynamicThingGroupRequest request) {
request = beforeClientExecution(request);
return executeDeleteDynamicThingGroup(request);
}
@SdkInternalApi
final DeleteDynamicThingGroupResult executeDeleteDynamicThingGroup(DeleteDynamicThingGroupRequest deleteDynamicThingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(deleteDynamicThingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteDynamicThingGroupRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteDynamicThingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDynamicThingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteDynamicThingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a job and its related job executions.
*
*
* Deleting a job may take time, depending on the number of job executions created for the job and various other
* factors. While the job is being deleted, the status of the job will be shown as "DELETION_IN_PROGRESS".
* Attempting to delete or cancel a job whose status is already "DELETION_IN_PROGRESS" will result in an error.
*
*
* Only 10 jobs may have status "DELETION_IN_PROGRESS" at the same time, or a LimitExceededException will occur.
*
*
* @param deleteJobRequest
* @return Result of the DeleteJob operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws InvalidStateTransitionException
* An attempt was made to change to an invalid state, for example by deleting a job or a job execution which
* is "IN_PROGRESS" without setting the force
parameter.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws LimitExceededException
* A limit has been exceeded.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.DeleteJob
*/
@Override
public DeleteJobResult deleteJob(DeleteJobRequest request) {
request = beforeClientExecution(request);
return executeDeleteJob(request);
}
@SdkInternalApi
final DeleteJobResult executeDeleteJob(DeleteJobRequest deleteJobRequest) {
ExecutionContext executionContext = createExecutionContext(deleteJobRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteJobRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteJob");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata()
.withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteJobResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a job execution.
*
*
* @param deleteJobExecutionRequest
* @return Result of the DeleteJobExecution operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws InvalidStateTransitionException
* An attempt was made to change to an invalid state, for example by deleting a job or a job execution which
* is "IN_PROGRESS" without setting the force
parameter.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.DeleteJobExecution
*/
@Override
public DeleteJobExecutionResult deleteJobExecution(DeleteJobExecutionRequest request) {
request = beforeClientExecution(request);
return executeDeleteJobExecution(request);
}
@SdkInternalApi
final DeleteJobExecutionResult executeDeleteJobExecution(DeleteJobExecutionRequest deleteJobExecutionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteJobExecutionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteJobExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteJobExecutionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteJobExecution");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteJobExecutionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a defined mitigation action from your AWS account.
*
*
* @param deleteMitigationActionRequest
* @return Result of the DeleteMitigationAction operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteMitigationAction
*/
@Override
public DeleteMitigationActionResult deleteMitigationAction(DeleteMitigationActionRequest request) {
request = beforeClientExecution(request);
return executeDeleteMitigationAction(request);
}
@SdkInternalApi
final DeleteMitigationActionResult executeDeleteMitigationAction(DeleteMitigationActionRequest deleteMitigationActionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteMitigationActionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteMitigationActionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteMitigationActionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteMitigationAction");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteMitigationActionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Delete an OTA update.
*
*
* @param deleteOTAUpdateRequest
* @return Result of the DeleteOTAUpdate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @sample AWSIot.DeleteOTAUpdate
*/
@Override
public DeleteOTAUpdateResult deleteOTAUpdate(DeleteOTAUpdateRequest request) {
request = beforeClientExecution(request);
return executeDeleteOTAUpdate(request);
}
@SdkInternalApi
final DeleteOTAUpdateResult executeDeleteOTAUpdate(DeleteOTAUpdateRequest deleteOTAUpdateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteOTAUpdateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteOTAUpdateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteOTAUpdateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteOTAUpdate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteOTAUpdateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified policy.
*
*
* A policy cannot be deleted if it has non-default versions or it is attached to any certificate.
*
*
* To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the
* DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete
* the policy.
*
*
* When a policy is deleted using DeletePolicy, its default version is deleted with it.
*
*
* @param deletePolicyRequest
* The input for the DeletePolicy operation.
* @return Result of the DeletePolicy operation returned by the service.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeletePolicy
*/
@Override
public DeletePolicyResult deletePolicy(DeletePolicyRequest request) {
request = beforeClientExecution(request);
return executeDeletePolicy(request);
}
@SdkInternalApi
final DeletePolicyResult executeDeletePolicy(DeletePolicyRequest deletePolicyRequest) {
ExecutionContext executionContext = createExecutionContext(deletePolicyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePolicyRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePolicy");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePolicyResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified version of the specified policy. You cannot delete the default version of a policy using
* this API. To delete the default version of a policy, use DeletePolicy. To find out which version of a
* policy is marked as the default version, use ListPolicyVersions.
*
*
* @param deletePolicyVersionRequest
* The input for the DeletePolicyVersion operation.
* @return Result of the DeletePolicyVersion operation returned by the service.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeletePolicyVersion
*/
@Override
public DeletePolicyVersionResult deletePolicyVersion(DeletePolicyVersionRequest request) {
request = beforeClientExecution(request);
return executeDeletePolicyVersion(request);
}
@SdkInternalApi
final DeletePolicyVersionResult executeDeletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest) {
ExecutionContext executionContext = createExecutionContext(deletePolicyVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePolicyVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePolicyVersionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePolicyVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePolicyVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a fleet provisioning template.
*
*
* @param deleteProvisioningTemplateRequest
* @return Result of the DeleteProvisioningTemplate operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @sample AWSIot.DeleteProvisioningTemplate
*/
@Override
public DeleteProvisioningTemplateResult deleteProvisioningTemplate(DeleteProvisioningTemplateRequest request) {
request = beforeClientExecution(request);
return executeDeleteProvisioningTemplate(request);
}
@SdkInternalApi
final DeleteProvisioningTemplateResult executeDeleteProvisioningTemplate(DeleteProvisioningTemplateRequest deleteProvisioningTemplateRequest) {
ExecutionContext executionContext = createExecutionContext(deleteProvisioningTemplateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteProvisioningTemplateRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteProvisioningTemplateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProvisioningTemplate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteProvisioningTemplateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a fleet provisioning template version.
*
*
* @param deleteProvisioningTemplateVersionRequest
* @return Result of the DeleteProvisioningTemplateVersion operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @sample AWSIot.DeleteProvisioningTemplateVersion
*/
@Override
public DeleteProvisioningTemplateVersionResult deleteProvisioningTemplateVersion(DeleteProvisioningTemplateVersionRequest request) {
request = beforeClientExecution(request);
return executeDeleteProvisioningTemplateVersion(request);
}
@SdkInternalApi
final DeleteProvisioningTemplateVersionResult executeDeleteProvisioningTemplateVersion(
DeleteProvisioningTemplateVersionRequest deleteProvisioningTemplateVersionRequest) {
ExecutionContext executionContext = createExecutionContext(deleteProvisioningTemplateVersionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteProvisioningTemplateVersionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteProvisioningTemplateVersionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProvisioningTemplateVersion");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteProvisioningTemplateVersionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a CA certificate registration code.
*
*
* @param deleteRegistrationCodeRequest
* The input for the DeleteRegistrationCode operation.
* @return Result of the DeleteRegistrationCode operation returned by the service.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteRegistrationCode
*/
@Override
public DeleteRegistrationCodeResult deleteRegistrationCode(DeleteRegistrationCodeRequest request) {
request = beforeClientExecution(request);
return executeDeleteRegistrationCode(request);
}
@SdkInternalApi
final DeleteRegistrationCodeResult executeDeleteRegistrationCode(DeleteRegistrationCodeRequest deleteRegistrationCodeRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRegistrationCodeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRegistrationCodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRegistrationCodeRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRegistrationCode");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteRegistrationCodeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a role alias
*
*
* @param deleteRoleAliasRequest
* @return Result of the DeleteRoleAlias operation returned by the service.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DeleteRoleAlias
*/
@Override
public DeleteRoleAliasResult deleteRoleAlias(DeleteRoleAliasRequest request) {
request = beforeClientExecution(request);
return executeDeleteRoleAlias(request);
}
@SdkInternalApi
final DeleteRoleAliasResult executeDeleteRoleAlias(DeleteRoleAliasRequest deleteRoleAliasRequest) {
ExecutionContext executionContext = createExecutionContext(deleteRoleAliasRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRoleAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRoleAliasRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRoleAlias");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteRoleAliasResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a scheduled audit.
*
*
* @param deleteScheduledAuditRequest
* @return Result of the DeleteScheduledAudit operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteScheduledAudit
*/
@Override
public DeleteScheduledAuditResult deleteScheduledAudit(DeleteScheduledAuditRequest request) {
request = beforeClientExecution(request);
return executeDeleteScheduledAudit(request);
}
@SdkInternalApi
final DeleteScheduledAuditResult executeDeleteScheduledAudit(DeleteScheduledAuditRequest deleteScheduledAuditRequest) {
ExecutionContext executionContext = createExecutionContext(deleteScheduledAuditRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteScheduledAuditRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteScheduledAuditRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteScheduledAudit");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteScheduledAuditResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a Device Defender security profile.
*
*
* @param deleteSecurityProfileRequest
* @return Result of the DeleteSecurityProfile operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @sample AWSIot.DeleteSecurityProfile
*/
@Override
public DeleteSecurityProfileResult deleteSecurityProfile(DeleteSecurityProfileRequest request) {
request = beforeClientExecution(request);
return executeDeleteSecurityProfile(request);
}
@SdkInternalApi
final DeleteSecurityProfileResult executeDeleteSecurityProfile(DeleteSecurityProfileRequest deleteSecurityProfileRequest) {
ExecutionContext executionContext = createExecutionContext(deleteSecurityProfileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteSecurityProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSecurityProfileRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSecurityProfile");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteSecurityProfileResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a stream.
*
*
* @param deleteStreamRequest
* @return Result of the DeleteStream operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws DeleteConflictException
* You can't delete the resource because it is attached to one or more resources.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteStream
*/
@Override
public DeleteStreamResult deleteStream(DeleteStreamRequest request) {
request = beforeClientExecution(request);
return executeDeleteStream(request);
}
@SdkInternalApi
final DeleteStreamResult executeDeleteStream(DeleteStreamRequest deleteStreamRequest) {
ExecutionContext executionContext = createExecutionContext(deleteStreamRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteStreamRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteStream");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteStreamResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a
* thing that doesn't exist.
*
*
* @param deleteThingRequest
* The input for the DeleteThing operation.
* @return Result of the DeleteThing operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteThing
*/
@Override
public DeleteThingResult deleteThing(DeleteThingRequest request) {
request = beforeClientExecution(request);
return executeDeleteThing(request);
}
@SdkInternalApi
final DeleteThingResult executeDeleteThing(DeleteThingRequest deleteThingRequest) {
ExecutionContext executionContext = createExecutionContext(deleteThingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteThingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteThingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteThing");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteThingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a thing group.
*
*
* @param deleteThingGroupRequest
* @return Result of the DeleteThingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws VersionConflictException
* An exception thrown when the version of an entity specified with the expectedVersion
* parameter does not match the latest version in the system.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteThingGroup
*/
@Override
public DeleteThingGroupResult deleteThingGroup(DeleteThingGroupRequest request) {
request = beforeClientExecution(request);
return executeDeleteThingGroup(request);
}
@SdkInternalApi
final DeleteThingGroupResult executeDeleteThingGroup(DeleteThingGroupRequest deleteThingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(deleteThingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteThingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteThingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteThingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteThingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a
* thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things
* by calling UpdateThing to change the thing type on any associated thing, and finally use
* DeleteThingType to delete the thing type.
*
*
* @param deleteThingTypeRequest
* The input for the DeleteThingType operation.
* @return Result of the DeleteThingType operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeleteThingType
*/
@Override
public DeleteThingTypeResult deleteThingType(DeleteThingTypeRequest request) {
request = beforeClientExecution(request);
return executeDeleteThingType(request);
}
@SdkInternalApi
final DeleteThingTypeResult executeDeleteThingType(DeleteThingTypeRequest deleteThingTypeRequest) {
ExecutionContext executionContext = createExecutionContext(deleteThingTypeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteThingTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteThingTypeRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteThingType");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteThingTypeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes the rule.
*
*
* @param deleteTopicRuleRequest
* The input for the DeleteTopicRule operation.
* @return Result of the DeleteTopicRule operation returned by the service.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.DeleteTopicRule
*/
@Override
public DeleteTopicRuleResult deleteTopicRule(DeleteTopicRuleRequest request) {
request = beforeClientExecution(request);
return executeDeleteTopicRule(request);
}
@SdkInternalApi
final DeleteTopicRuleResult executeDeleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest) {
ExecutionContext executionContext = createExecutionContext(deleteTopicRuleRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTopicRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTopicRuleRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTopicRule");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTopicRuleResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a topic rule destination.
*
*
* @param deleteTopicRuleDestinationRequest
* @return Result of the DeleteTopicRuleDestination operation returned by the service.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @sample AWSIot.DeleteTopicRuleDestination
*/
@Override
public DeleteTopicRuleDestinationResult deleteTopicRuleDestination(DeleteTopicRuleDestinationRequest request) {
request = beforeClientExecution(request);
return executeDeleteTopicRuleDestination(request);
}
@SdkInternalApi
final DeleteTopicRuleDestinationResult executeDeleteTopicRuleDestination(DeleteTopicRuleDestinationRequest deleteTopicRuleDestinationRequest) {
ExecutionContext executionContext = createExecutionContext(deleteTopicRuleDestinationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTopicRuleDestinationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(deleteTopicRuleDestinationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTopicRuleDestination");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteTopicRuleDestinationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deletes a logging level.
*
*
* @param deleteV2LoggingLevelRequest
* @return Result of the DeleteV2LoggingLevel operation returned by the service.
* @throws InternalException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @sample AWSIot.DeleteV2LoggingLevel
*/
@Override
public DeleteV2LoggingLevelResult deleteV2LoggingLevel(DeleteV2LoggingLevelRequest request) {
request = beforeClientExecution(request);
return executeDeleteV2LoggingLevel(request);
}
@SdkInternalApi
final DeleteV2LoggingLevelResult executeDeleteV2LoggingLevel(DeleteV2LoggingLevelRequest deleteV2LoggingLevelRequest) {
ExecutionContext executionContext = createExecutionContext(deleteV2LoggingLevelRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteV2LoggingLevelRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteV2LoggingLevelRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteV2LoggingLevel");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteV2LoggingLevelResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Deprecates a thing type. You can not associate new things with deprecated thing type.
*
*
* @param deprecateThingTypeRequest
* The input for the DeprecateThingType operation.
* @return Result of the DeprecateThingType operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DeprecateThingType
*/
@Override
public DeprecateThingTypeResult deprecateThingType(DeprecateThingTypeRequest request) {
request = beforeClientExecution(request);
return executeDeprecateThingType(request);
}
@SdkInternalApi
final DeprecateThingTypeResult executeDeprecateThingType(DeprecateThingTypeRequest deprecateThingTypeRequest) {
ExecutionContext executionContext = createExecutionContext(deprecateThingTypeRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeprecateThingTypeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deprecateThingTypeRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeprecateThingType");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeprecateThingTypeResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about the Device Defender audit settings for this account. Settings include how audit
* notifications are sent and which audit checks are enabled or disabled.
*
*
* @param describeAccountAuditConfigurationRequest
* @return Result of the DescribeAccountAuditConfiguration operation returned by the service.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAccountAuditConfiguration
*/
@Override
public DescribeAccountAuditConfigurationResult describeAccountAuditConfiguration(DescribeAccountAuditConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeAccountAuditConfiguration(request);
}
@SdkInternalApi
final DescribeAccountAuditConfigurationResult executeDescribeAccountAuditConfiguration(
DescribeAccountAuditConfigurationRequest describeAccountAuditConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeAccountAuditConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAccountAuditConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeAccountAuditConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAccountAuditConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeAccountAuditConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of
* the issue, and when the audit that returned the finding was started.
*
*
* @param describeAuditFindingRequest
* @return Result of the DescribeAuditFinding operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAuditFinding
*/
@Override
public DescribeAuditFindingResult describeAuditFinding(DescribeAuditFindingRequest request) {
request = beforeClientExecution(request);
return executeDescribeAuditFinding(request);
}
@SdkInternalApi
final DescribeAuditFindingResult executeDescribeAuditFinding(DescribeAuditFindingRequest describeAuditFindingRequest) {
ExecutionContext executionContext = createExecutionContext(describeAuditFindingRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAuditFindingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAuditFindingRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditFinding");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAuditFindingResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit
* findings. Properties include the actions being applied, the audit checks to which they're being applied, the task
* status, and aggregated task statistics.
*
*
* @param describeAuditMitigationActionsTaskRequest
* @return Result of the DescribeAuditMitigationActionsTask operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAuditMitigationActionsTask
*/
@Override
public DescribeAuditMitigationActionsTaskResult describeAuditMitigationActionsTask(DescribeAuditMitigationActionsTaskRequest request) {
request = beforeClientExecution(request);
return executeDescribeAuditMitigationActionsTask(request);
}
@SdkInternalApi
final DescribeAuditMitigationActionsTaskResult executeDescribeAuditMitigationActionsTask(
DescribeAuditMitigationActionsTaskRequest describeAuditMitigationActionsTaskRequest) {
ExecutionContext executionContext = createExecutionContext(describeAuditMitigationActionsTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAuditMitigationActionsTaskRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeAuditMitigationActionsTaskRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditMitigationActionsTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeAuditMitigationActionsTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about a Device Defender audit suppression.
*
*
* @param describeAuditSuppressionRequest
* @return Result of the DescribeAuditSuppression operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAuditSuppression
*/
@Override
public DescribeAuditSuppressionResult describeAuditSuppression(DescribeAuditSuppressionRequest request) {
request = beforeClientExecution(request);
return executeDescribeAuditSuppression(request);
}
@SdkInternalApi
final DescribeAuditSuppressionResult executeDescribeAuditSuppression(DescribeAuditSuppressionRequest describeAuditSuppressionRequest) {
ExecutionContext executionContext = createExecutionContext(describeAuditSuppressionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAuditSuppressionRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeAuditSuppressionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditSuppression");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeAuditSuppressionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about a Device Defender audit.
*
*
* @param describeAuditTaskRequest
* @return Result of the DescribeAuditTask operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAuditTask
*/
@Override
public DescribeAuditTaskResult describeAuditTask(DescribeAuditTaskRequest request) {
request = beforeClientExecution(request);
return executeDescribeAuditTask(request);
}
@SdkInternalApi
final DescribeAuditTaskResult executeDescribeAuditTask(DescribeAuditTaskRequest describeAuditTaskRequest) {
ExecutionContext executionContext = createExecutionContext(describeAuditTaskRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAuditTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAuditTaskRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditTask");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAuditTaskResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes an authorizer.
*
*
* @param describeAuthorizerRequest
* @return Result of the DescribeAuthorizer operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeAuthorizer
*/
@Override
public DescribeAuthorizerResult describeAuthorizer(DescribeAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeDescribeAuthorizer(request);
}
@SdkInternalApi
final DescribeAuthorizerResult executeDescribeAuthorizer(DescribeAuthorizerRequest describeAuthorizerRequest) {
ExecutionContext executionContext = createExecutionContext(describeAuthorizerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeAuthorizerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAuthorizerRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuthorizer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAuthorizerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns information about a billing group.
*
*
* @param describeBillingGroupRequest
* @return Result of the DescribeBillingGroup operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DescribeBillingGroup
*/
@Override
public DescribeBillingGroupResult describeBillingGroup(DescribeBillingGroupRequest request) {
request = beforeClientExecution(request);
return executeDescribeBillingGroup(request);
}
@SdkInternalApi
final DescribeBillingGroupResult executeDescribeBillingGroup(DescribeBillingGroupRequest describeBillingGroupRequest) {
ExecutionContext executionContext = createExecutionContext(describeBillingGroupRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeBillingGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeBillingGroupRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeBillingGroup");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeBillingGroupResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes a registered CA certificate.
*
*
* @param describeCACertificateRequest
* The input for the DescribeCACertificate operation.
* @return Result of the DescribeCACertificate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DescribeCACertificate
*/
@Override
public DescribeCACertificateResult describeCACertificate(DescribeCACertificateRequest request) {
request = beforeClientExecution(request);
return executeDescribeCACertificate(request);
}
@SdkInternalApi
final DescribeCACertificateResult executeDescribeCACertificate(DescribeCACertificateRequest describeCACertificateRequest) {
ExecutionContext executionContext = createExecutionContext(describeCACertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeCACertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCACertificateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCACertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory
.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeCACertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets information about the specified certificate.
*
*
* @param describeCertificateRequest
* The input for the DescribeCertificate operation.
* @return Result of the DescribeCertificate operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DescribeCertificate
*/
@Override
public DescribeCertificateResult describeCertificate(DescribeCertificateRequest request) {
request = beforeClientExecution(request);
return executeDescribeCertificate(request);
}
@SdkInternalApi
final DescribeCertificateResult executeDescribeCertificate(DescribeCertificateRequest describeCertificateRequest) {
ExecutionContext executionContext = createExecutionContext(describeCertificateRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeCertificateRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCertificate");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeCertificateResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes the default authorizer.
*
*
* @param describeDefaultAuthorizerRequest
* @return Result of the DescribeDefaultAuthorizer operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeDefaultAuthorizer
*/
@Override
public DescribeDefaultAuthorizerResult describeDefaultAuthorizer(DescribeDefaultAuthorizerRequest request) {
request = beforeClientExecution(request);
return executeDescribeDefaultAuthorizer(request);
}
@SdkInternalApi
final DescribeDefaultAuthorizerResult executeDescribeDefaultAuthorizer(DescribeDefaultAuthorizerRequest describeDefaultAuthorizerRequest) {
ExecutionContext executionContext = createExecutionContext(describeDefaultAuthorizerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDefaultAuthorizerRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeDefaultAuthorizerRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDefaultAuthorizer");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeDefaultAuthorizerResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Provides details about a dimension that is defined in your AWS account.
*
*
* @param describeDimensionRequest
* @return Result of the DescribeDimension operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.DescribeDimension
*/
@Override
public DescribeDimensionResult describeDimension(DescribeDimensionRequest request) {
request = beforeClientExecution(request);
return executeDescribeDimension(request);
}
@SdkInternalApi
final DescribeDimensionResult executeDescribeDimension(DescribeDimensionRequest describeDimensionRequest) {
ExecutionContext executionContext = createExecutionContext(describeDimensionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDimensionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeDimensionRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDimension");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDimensionResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Gets summary information about a domain configuration.
*
*
*
* The domain configuration feature is in public preview and is subject to change.
*
*
*
* @param describeDomainConfigurationRequest
* @return Result of the DescribeDomainConfiguration operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws InvalidRequestException
* The request is not valid.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @sample AWSIot.DescribeDomainConfiguration
*/
@Override
public DescribeDomainConfigurationResult describeDomainConfiguration(DescribeDomainConfigurationRequest request) {
request = beforeClientExecution(request);
return executeDescribeDomainConfiguration(request);
}
@SdkInternalApi
final DescribeDomainConfigurationResult executeDescribeDomainConfiguration(DescribeDomainConfigurationRequest describeDomainConfigurationRequest) {
ExecutionContext executionContext = createExecutionContext(describeDomainConfigurationRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeDomainConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeDomainConfigurationRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDomainConfiguration");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeDomainConfigurationResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Returns a unique endpoint specific to the AWS account making the call.
*
*
* @param describeEndpointRequest
* The input for the DescribeEndpoint operation.
* @return Result of the DescribeEndpoint operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws InvalidRequestException
* The request is not valid.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.DescribeEndpoint
*/
@Override
public DescribeEndpointResult describeEndpoint(DescribeEndpointRequest request) {
request = beforeClientExecution(request);
return executeDescribeEndpoint(request);
}
@SdkInternalApi
final DescribeEndpointResult executeDescribeEndpoint(DescribeEndpointRequest describeEndpointRequest) {
ExecutionContext executionContext = createExecutionContext(describeEndpointRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeEndpointRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEndpointRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEndpoint");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEndpointResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes event configurations.
*
*
* @param describeEventConfigurationsRequest
* @return Result of the DescribeEventConfigurations operation returned by the service.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ThrottlingException
* The rate exceeds the limit.
* @sample AWSIot.DescribeEventConfigurations
*/
@Override
public DescribeEventConfigurationsResult describeEventConfigurations(DescribeEventConfigurationsRequest request) {
request = beforeClientExecution(request);
return executeDescribeEventConfigurations(request);
}
@SdkInternalApi
final DescribeEventConfigurationsResult executeDescribeEventConfigurations(DescribeEventConfigurationsRequest describeEventConfigurationsRequest) {
ExecutionContext executionContext = createExecutionContext(describeEventConfigurationsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeEventConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super
.beforeMarshalling(describeEventConfigurationsRequest));
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
request.addHandlerContext(HandlerContextKey.SERVICE_ID, "IoT");
request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEventConfigurations");
request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeEventConfigurationsResultJsonUnmarshaller());
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
endClientExecution(awsRequestMetrics, request, response);
}
}
/**
*
* Describes a search index.
*
*
* @param describeIndexRequest
* @return Result of the DescribeIndex operation returned by the service.
* @throws InvalidRequestException
* The request is not valid.
* @throws ThrottlingException
* The rate exceeds the limit.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws ServiceUnavailableException
* The service is temporarily unavailable.
* @throws InternalFailureException
* An unexpected error has occurred.
* @throws ResourceNotFoundException
* The specified resource does not exist.
* @sample AWSIot.DescribeIndex
*/
@Override
public DescribeIndexResult describeIndex(DescribeIndexRequest request) {
request = beforeClientExecution(request);
return executeDescribeIndex(request);
}
@SdkInternalApi
final DescribeIndexResult executeDescribeIndex(DescribeIndexRequest describeIndexRequest) {
ExecutionContext executionContext = createExecutionContext(describeIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response