/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.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. *
*
* IoT provides secure, bi-directional communication between Internet-connected devices (such as sensors, actuators, * embedded devices, or smart appliances) and the Amazon Web Services 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 Amazon Web Services 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 Amazon Web * Services Signature Version 4 to sign the request is: execute-api. *
** For more information about how IoT works, see the Developer Guide. *
** For information about how to use the credentials provider for IoT, see Authorizing Direct Calls to * Amazon Web Services 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 = "iot"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NotConfiguredException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.NotConfiguredExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidQueryException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.InvalidQueryExceptionUnmarshaller.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("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.ResourceNotFoundExceptionUnmarshaller.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("CertificateStateException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.CertificateStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalFailureException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.InternalFailureExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.ServiceQuotaExceededExceptionUnmarshaller.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("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("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("InvalidAggregationException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.InvalidAggregationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SqlParseException").withExceptionUnmarshaller( com.amazonaws.services.iot.model.transform.SqlParseExceptionUnmarshaller.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("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("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: ** 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: *
* 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. *
** Requires permission to access the AcceptCertificateTransfer action. *
* * @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* Adds a thing to a billing group. *
** Requires permission to access the AddThingToBillingGroup action. *
* * @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* Adds a thing to a thing group. *
** Requires permission to access the AddThingToThingGroup action. *
* * @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* 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. *
** Requires permission to access the AssociateTargetsWithJob action. *
* * @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* Attaches the specified policy to the specified principal (certificate or other credential). *
** Requires permission to access the AttachPolicy action. *
* * @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* Attaches the specified policy to the specified principal (certificate or other credential). *
** Note: This action is deprecated and works as expected for backward compatibility, but we won't add * enhancements. Use AttachPolicy instead. *
** Requires permission to access the AttachPrincipalPolicy action. *
* * @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* 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. *
** Requires permission to access the AttachSecurityProfile action. *
* * @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 theexpectedVersion
* 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* Attaches the specified principal to the specified thing. A principal can be X.509 certificates, Amazon Cognito * identities or federated identities. *
** Requires permission to access the AttachThingPrincipal action. *
* * @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* Cancels a mitigation action task that is in progress. If the task is not in progress, an InvalidRequestException * occurs. *
** Requires permission to access the CancelAuditMitigationActionsTask action. *
* * @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* Cancels an audit that is in progress. The audit can be either scheduled or on demand. If the audit isn't in * progress, an "InvalidRequestException" occurs. *
** Requires permission to access the CancelAuditTask action. *
* * @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* 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, 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. *
** Requires permission to access the CancelCertificateTransfer action. *
* * @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* Cancels a Device Defender ML Detect mitigation action. *
** Requires permission to access the CancelDetectMitigationActionsTask action. *
* * @param cancelDetectMitigationActionsTaskRequest * @return Result of the CancelDetectMitigationActionsTask 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.CancelDetectMitigationActionsTask */ @Override public CancelDetectMitigationActionsTaskResult cancelDetectMitigationActionsTask(CancelDetectMitigationActionsTaskRequest request) { request = beforeClientExecution(request); return executeCancelDetectMitigationActionsTask(request); } @SdkInternalApi final CancelDetectMitigationActionsTaskResult executeCancelDetectMitigationActionsTask( CancelDetectMitigationActionsTaskRequest cancelDetectMitigationActionsTaskRequest) { ExecutionContext executionContext = createExecutionContext(cancelDetectMitigationActionsTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Cancels a job. *
** Requires permission to access the CancelJob action. *
* * @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. * @throws LimitExceededException * A limit has been exceeded. * @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* Cancels the execution of a job for a given thing. *
** Requires permission to access the CancelJobExecution action. *
* * @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 theforce
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* Clears the default authorizer. *
** Requires permission to access the ClearDefaultAuthorizer action. *
* * @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
* Confirms a topic rule destination. When you create a rule requiring a destination, 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.
*
* Requires permission to access the ConfirmTopicRuleDestination action. *
* * @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* Creates a Device Defender audit suppression. *
** Requires permission to access the CreateAuditSuppression action. *
* * @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* Creates an authorizer. *
** Requires permission to access the CreateAuthorizer action. *
* * @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* Creates a billing group. *
** Requires permission to access the CreateBillingGroup action. *
* * @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* Creates an X.509 certificate using the specified certificate signing request. *
** Requires permission to access the CreateCertificateFromCsr action. *
** 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. For supported certificates, consult * Certificate signing algorithms supported by IoT. *
** 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. In the following commands, we assume that 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
Amazon Web Services CLI command to create a certificate for the
* corresponding CSR.
*
* You can also run the aws iot create-certificate-from-csr
part of the command 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"
*
* Use this API to define a Custom Metric published by your devices to Device Defender. *
** Requires permission to access the CreateCustomMetric action. *
* * @param createCustomMetricRequest * @return Result of the CreateCustomMetric operation returned by the service. * @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. * @throws InternalFailureException * An unexpected error has occurred. * @sample AWSIot.CreateCustomMetric */ @Override public CreateCustomMetricResult createCustomMetric(CreateCustomMetricRequest request) { request = beforeClientExecution(request); return executeCreateCustomMetric(request); } @SdkInternalApi final CreateCustomMetricResult executeCreateCustomMetric(CreateCustomMetricRequest createCustomMetricRequest) { ExecutionContext executionContext = createExecutionContext(createCustomMetricRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Create a dimension that you can use to limit the scope of a metric used in a security profile for 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.
*
* Requires permission to access the CreateDimension action. *
* * @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* Creates a domain configuration. *
** Requires permission to access the CreateDomainConfiguration action. *
* * @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* Creates a dynamic thing group. *
** Requires permission to access the CreateDynamicThingGroup action. *
* * @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* Creates a fleet metric. *
** Requires permission to access the CreateFleetMetric action. *
* * @param createFleetMetricRequest * @return Result of the CreateFleetMetric 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 LimitExceededException * A limit has been exceeded. * @throws ResourceAlreadyExistsException * The resource already exists. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidQueryException * The query is invalid. * @throws InvalidAggregationException * The aggregation is invalid. * @throws IndexNotReadyException * The index is not ready. * @sample AWSIot.CreateFleetMetric */ @Override public CreateFleetMetricResult createFleetMetric(CreateFleetMetricRequest request) { request = beforeClientExecution(request); return executeCreateFleetMetric(request); } @SdkInternalApi final CreateFleetMetricResult executeCreateFleetMetric(CreateFleetMetricRequest createFleetMetricRequest) { ExecutionContext executionContext = createExecutionContext(createFleetMetricRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a job. *
** Requires permission to access the CreateJob action. *
* * @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* Creates a job template. *
** Requires permission to access the CreateJobTemplate action. *
* * @param createJobTemplateRequest * @return Result of the CreateJobTemplate operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ConflictException * A resource with the same name 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.CreateJobTemplate */ @Override public CreateJobTemplateResult createJobTemplate(CreateJobTemplateRequest request) { request = beforeClientExecution(request); return executeCreateJobTemplate(request); } @SdkInternalApi final CreateJobTemplateResult executeCreateJobTemplate(CreateJobTemplateRequest createJobTemplateRequest) { ExecutionContext executionContext = createExecutionContext(createJobTemplateRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* 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 IoT issues the private key for this certificate, so it is important to keep it * in a secure location. *
** Requires permission to access the CreateKeysAndCertificate action. *
* * @param createKeysAndCertificateRequest * The input for the CreateKeysAndCertificate operation. *
* Requires permission to access the CreateKeysAndCertificateRequest action.
* @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
* 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.
*
* Requires permission to access the CreateMitigationAction action.
*
* Creates an IoT OTA update on a target group of things or groups.
*
* Requires permission to access the CreateOTAUpdate action.
*
* Creates an IoT software package that can be deployed to your fleet.
*
* Requires permission to access the CreatePackage and GetIndexingConfiguration actions.
*
* Creates a new version for an existing IoT software package.
*
* Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.
*
* Creates an 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.
*
* Requires permission to access the CreatePolicy action.
*
* Creates a new version of the specified 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).
*
* Requires permission to access the CreatePolicyVersion action.
*
* Creates a provisioning claim.
*
* Requires permission to access the CreateProvisioningClaim action.
*
* Creates a provisioning template.
*
* Requires permission to access the CreateProvisioningTemplate action.
*
* Creates a new version of a provisioning template.
*
* Requires permission to access the CreateProvisioningTemplateVersion action.
*
* Creates a role alias.
*
* Requires permission to access the CreateRoleAlias action.
*
* Creates a scheduled audit that is run at a specified time interval.
*
* Requires permission to access the CreateScheduledAudit action.
*
* Creates a Device Defender security profile.
*
* Requires permission to access the CreateSecurityProfile action.
*
* 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.
*
* Requires permission to access the CreateStream action.
*
* 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
*
* This is a control plane operation. See Authorization for
* information about authorizing control plane actions.
*
* Requires permission to access the CreateThing action.
*
* Create a thing group.
*
* This is a control plane operation. See Authorization for
* information about authorizing control plane actions.
*
* Requires permission to access the CreateThingGroup action.
*
* Creates a new thing type.
*
* Requires permission to access the CreateThingType action.
*
* 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.
*
* Requires permission to access the CreateTopicRule action.
*
* Creates a topic rule destination. The destination must be confirmed prior to use.
*
* Requires permission to access the CreateTopicRuleDestination action.
*
* 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.
*
* Requires permission to access the DeleteAccountAuditConfiguration action.
*
* Deletes a Device Defender audit suppression.
*
* Requires permission to access the DeleteAuditSuppression action.
*
* Deletes an authorizer.
*
* Requires permission to access the DeleteAuthorizer action.
*
* Deletes the billing group.
*
* Requires permission to access the DeleteBillingGroup action.
*
* Deletes a registered CA certificate.
*
* Requires permission to access the DeleteCACertificate action.
*
* 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 DetachPolicy action to detach all policies. Next, use the
* UpdateCertificate action to set the certificate to the INACTIVE status.
*
* Requires permission to access the DeleteCertificate action.
*
* Deletes a Device Defender detect custom metric.
*
* Requires permission to access the DeleteCustomMetric action.
*
* Before you can delete a custom metric, you must first remove the custom metric from all security profiles it's a
* part of. The security profile associated with the custom metric can be found using the ListSecurityProfiles
* API with
* Removes the specified dimension from your Amazon Web Services accounts.
*
* Requires permission to access the DeleteDimension action.
*
* Deletes the specified domain configuration.
*
* Requires permission to access the DeleteDomainConfiguration action.
*
* Deletes a dynamic thing group.
*
* Requires permission to access the DeleteDynamicThingGroup action.
*
* Deletes the specified fleet metric. Returns successfully with no error if the deletion is successful or you
* specify a fleet metric that doesn't exist.
*
* Requires permission to access the DeleteFleetMetric action.
*
* 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.
*
* Requires permission to access the DeleteJob action.
*
* Deletes a job execution.
*
* Requires permission to access the DeleteJobExecution action.
*
* Deletes the specified job template.
*
* Deletes a defined mitigation action from your Amazon Web Services accounts.
*
* Requires permission to access the DeleteMitigationAction action.
*
* Delete an OTA update.
*
* Requires permission to access the DeleteOTAUpdate action.
*
* Deletes a specific version from a software package.
*
* Note: All package versions must be deleted before deleting the software package.
*
* Requires permission to access the DeletePackageVersion action.
*
* Deletes a specific version from a software package.
*
* Note: If a package version is designated as default, you must remove the designation from the package
* using the UpdatePackage action.
*
* 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 action to delete all non-default versions of the policy;
* use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy
* action to delete the policy.
*
* When a policy is deleted using DeletePolicy, its default version is deleted with it.
*
* Because of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is
* detached before it's ready to be deleted.
*
* Requires permission to access the DeletePolicy action.
*
* Deletes the specified version of the specified policy. You cannot delete the default version of a policy using
* this action. 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.
*
* Requires permission to access the DeletePolicyVersion action.
*
* Deletes a provisioning template.
*
* Requires permission to access the DeleteProvisioningTemplate action.
*
* Deletes a provisioning template version.
*
* Requires permission to access the DeleteProvisioningTemplateVersion action.
*
* Deletes a CA certificate registration code.
*
* Requires permission to access the DeleteRegistrationCode action.
*
* Deletes a role alias
*
* Requires permission to access the DeleteRoleAlias action.
*
* Deletes a scheduled audit.
*
* Requires permission to access the DeleteScheduledAudit action.
*
* Deletes a Device Defender security profile.
*
* Requires permission to access the DeleteSecurityProfile action.
*
* Deletes a stream.
*
* Requires permission to access the DeleteStream action.
*
* Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a
* thing that doesn't exist.
*
* Requires permission to access the DeleteThing action.
*
* Deletes a thing group.
*
* Requires permission to access the DeleteThingGroup action.
*
* 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.
*
* Requires permission to access the DeleteThingType action.
*
* Deletes the rule.
*
* Requires permission to access the DeleteTopicRule action.
*
* Deletes a topic rule destination.
*
* Requires permission to access the DeleteTopicRuleDestination action.
*
* Deletes a logging level.
*
* Requires permission to access the DeleteV2LoggingLevel action.
*
* Deprecates a thing type. You can not associate new things with deprecated thing type.
*
* Requires permission to access the DeprecateThingType action.
*
* 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.
*
* Requires permission to access the DescribeAccountAuditConfiguration action.
*
* Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of
* the issue, and the start time when the audit that returned the finding.
*
* Requires permission to access the DescribeAuditFinding action.
*
* 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.
*
* Gets information about a Device Defender audit suppression.
*
* Gets information about a Device Defender audit.
*
* Requires permission to access the DescribeAuditTask action.
* ResourceAlreadyExistsException
is thrown.
* 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);
RequestmetricName
set to your custom metric name.
* 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);
RequestexpectedVersion
* parameter does not match the latest version in the system.
* @sample AWSIot.DeleteFleetMetric
*/
@Override
public DeleteFleetMetricResult deleteFleetMetric(DeleteFleetMetricRequest request) {
request = beforeClientExecution(request);
return executeDeleteFleetMetric(request);
}
@SdkInternalApi
final DeleteFleetMetricResult executeDeleteFleetMetric(DeleteFleetMetricRequest deleteFleetMetricRequest) {
ExecutionContext executionContext = createExecutionContext(deleteFleetMetricRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Requestforce
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);
Requestforce
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);
RequestexpectedVersion
* 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);
RequestexpectedVersion
* 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);
RequestexpectedVersion
* 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);
RequestexpectedVersion
* 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