
software.amazon.awssdk.services.iot.DefaultIotClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.iot;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.iot.model.AcceptCertificateTransferRequest;
import software.amazon.awssdk.services.iot.model.AcceptCertificateTransferResponse;
import software.amazon.awssdk.services.iot.model.AddThingToBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.AddThingToBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.AddThingToThingGroupRequest;
import software.amazon.awssdk.services.iot.model.AddThingToThingGroupResponse;
import software.amazon.awssdk.services.iot.model.AssociateTargetsWithJobRequest;
import software.amazon.awssdk.services.iot.model.AssociateTargetsWithJobResponse;
import software.amazon.awssdk.services.iot.model.AttachPolicyRequest;
import software.amazon.awssdk.services.iot.model.AttachPolicyResponse;
import software.amazon.awssdk.services.iot.model.AttachSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.AttachSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.AttachThingPrincipalRequest;
import software.amazon.awssdk.services.iot.model.AttachThingPrincipalResponse;
import software.amazon.awssdk.services.iot.model.CancelAuditMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.CancelAuditMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.CancelAuditTaskRequest;
import software.amazon.awssdk.services.iot.model.CancelAuditTaskResponse;
import software.amazon.awssdk.services.iot.model.CancelCertificateTransferRequest;
import software.amazon.awssdk.services.iot.model.CancelCertificateTransferResponse;
import software.amazon.awssdk.services.iot.model.CancelDetectMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.CancelDetectMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.CancelJobExecutionRequest;
import software.amazon.awssdk.services.iot.model.CancelJobExecutionResponse;
import software.amazon.awssdk.services.iot.model.CancelJobRequest;
import software.amazon.awssdk.services.iot.model.CancelJobResponse;
import software.amazon.awssdk.services.iot.model.CertificateConflictException;
import software.amazon.awssdk.services.iot.model.CertificateStateException;
import software.amazon.awssdk.services.iot.model.CertificateValidationException;
import software.amazon.awssdk.services.iot.model.ClearDefaultAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.ClearDefaultAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.ConfirmTopicRuleDestinationRequest;
import software.amazon.awssdk.services.iot.model.ConfirmTopicRuleDestinationResponse;
import software.amazon.awssdk.services.iot.model.ConflictException;
import software.amazon.awssdk.services.iot.model.ConflictingResourceUpdateException;
import software.amazon.awssdk.services.iot.model.CreateAuditSuppressionRequest;
import software.amazon.awssdk.services.iot.model.CreateAuditSuppressionResponse;
import software.amazon.awssdk.services.iot.model.CreateAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.CreateAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.CreateBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.CreateBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.CreateCertificateFromCsrRequest;
import software.amazon.awssdk.services.iot.model.CreateCertificateFromCsrResponse;
import software.amazon.awssdk.services.iot.model.CreateCustomMetricRequest;
import software.amazon.awssdk.services.iot.model.CreateCustomMetricResponse;
import software.amazon.awssdk.services.iot.model.CreateDimensionRequest;
import software.amazon.awssdk.services.iot.model.CreateDimensionResponse;
import software.amazon.awssdk.services.iot.model.CreateDomainConfigurationRequest;
import software.amazon.awssdk.services.iot.model.CreateDomainConfigurationResponse;
import software.amazon.awssdk.services.iot.model.CreateDynamicThingGroupRequest;
import software.amazon.awssdk.services.iot.model.CreateDynamicThingGroupResponse;
import software.amazon.awssdk.services.iot.model.CreateFleetMetricRequest;
import software.amazon.awssdk.services.iot.model.CreateFleetMetricResponse;
import software.amazon.awssdk.services.iot.model.CreateJobRequest;
import software.amazon.awssdk.services.iot.model.CreateJobResponse;
import software.amazon.awssdk.services.iot.model.CreateJobTemplateRequest;
import software.amazon.awssdk.services.iot.model.CreateJobTemplateResponse;
import software.amazon.awssdk.services.iot.model.CreateKeysAndCertificateRequest;
import software.amazon.awssdk.services.iot.model.CreateKeysAndCertificateResponse;
import software.amazon.awssdk.services.iot.model.CreateMitigationActionRequest;
import software.amazon.awssdk.services.iot.model.CreateMitigationActionResponse;
import software.amazon.awssdk.services.iot.model.CreateOtaUpdateRequest;
import software.amazon.awssdk.services.iot.model.CreateOtaUpdateResponse;
import software.amazon.awssdk.services.iot.model.CreatePolicyRequest;
import software.amazon.awssdk.services.iot.model.CreatePolicyResponse;
import software.amazon.awssdk.services.iot.model.CreatePolicyVersionRequest;
import software.amazon.awssdk.services.iot.model.CreatePolicyVersionResponse;
import software.amazon.awssdk.services.iot.model.CreateProvisioningClaimRequest;
import software.amazon.awssdk.services.iot.model.CreateProvisioningClaimResponse;
import software.amazon.awssdk.services.iot.model.CreateProvisioningTemplateRequest;
import software.amazon.awssdk.services.iot.model.CreateProvisioningTemplateResponse;
import software.amazon.awssdk.services.iot.model.CreateProvisioningTemplateVersionRequest;
import software.amazon.awssdk.services.iot.model.CreateProvisioningTemplateVersionResponse;
import software.amazon.awssdk.services.iot.model.CreateRoleAliasRequest;
import software.amazon.awssdk.services.iot.model.CreateRoleAliasResponse;
import software.amazon.awssdk.services.iot.model.CreateScheduledAuditRequest;
import software.amazon.awssdk.services.iot.model.CreateScheduledAuditResponse;
import software.amazon.awssdk.services.iot.model.CreateSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.CreateSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.CreateStreamRequest;
import software.amazon.awssdk.services.iot.model.CreateStreamResponse;
import software.amazon.awssdk.services.iot.model.CreateThingGroupRequest;
import software.amazon.awssdk.services.iot.model.CreateThingGroupResponse;
import software.amazon.awssdk.services.iot.model.CreateThingRequest;
import software.amazon.awssdk.services.iot.model.CreateThingResponse;
import software.amazon.awssdk.services.iot.model.CreateThingTypeRequest;
import software.amazon.awssdk.services.iot.model.CreateThingTypeResponse;
import software.amazon.awssdk.services.iot.model.CreateTopicRuleDestinationRequest;
import software.amazon.awssdk.services.iot.model.CreateTopicRuleDestinationResponse;
import software.amazon.awssdk.services.iot.model.CreateTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.CreateTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.DeleteAccountAuditConfigurationRequest;
import software.amazon.awssdk.services.iot.model.DeleteAccountAuditConfigurationResponse;
import software.amazon.awssdk.services.iot.model.DeleteAuditSuppressionRequest;
import software.amazon.awssdk.services.iot.model.DeleteAuditSuppressionResponse;
import software.amazon.awssdk.services.iot.model.DeleteAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.DeleteAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.DeleteBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.DeleteBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.DeleteCaCertificateRequest;
import software.amazon.awssdk.services.iot.model.DeleteCaCertificateResponse;
import software.amazon.awssdk.services.iot.model.DeleteCertificateRequest;
import software.amazon.awssdk.services.iot.model.DeleteCertificateResponse;
import software.amazon.awssdk.services.iot.model.DeleteConflictException;
import software.amazon.awssdk.services.iot.model.DeleteCustomMetricRequest;
import software.amazon.awssdk.services.iot.model.DeleteCustomMetricResponse;
import software.amazon.awssdk.services.iot.model.DeleteDimensionRequest;
import software.amazon.awssdk.services.iot.model.DeleteDimensionResponse;
import software.amazon.awssdk.services.iot.model.DeleteDomainConfigurationRequest;
import software.amazon.awssdk.services.iot.model.DeleteDomainConfigurationResponse;
import software.amazon.awssdk.services.iot.model.DeleteDynamicThingGroupRequest;
import software.amazon.awssdk.services.iot.model.DeleteDynamicThingGroupResponse;
import software.amazon.awssdk.services.iot.model.DeleteFleetMetricRequest;
import software.amazon.awssdk.services.iot.model.DeleteFleetMetricResponse;
import software.amazon.awssdk.services.iot.model.DeleteJobExecutionRequest;
import software.amazon.awssdk.services.iot.model.DeleteJobExecutionResponse;
import software.amazon.awssdk.services.iot.model.DeleteJobRequest;
import software.amazon.awssdk.services.iot.model.DeleteJobResponse;
import software.amazon.awssdk.services.iot.model.DeleteJobTemplateRequest;
import software.amazon.awssdk.services.iot.model.DeleteJobTemplateResponse;
import software.amazon.awssdk.services.iot.model.DeleteMitigationActionRequest;
import software.amazon.awssdk.services.iot.model.DeleteMitigationActionResponse;
import software.amazon.awssdk.services.iot.model.DeleteOtaUpdateRequest;
import software.amazon.awssdk.services.iot.model.DeleteOtaUpdateResponse;
import software.amazon.awssdk.services.iot.model.DeletePolicyRequest;
import software.amazon.awssdk.services.iot.model.DeletePolicyResponse;
import software.amazon.awssdk.services.iot.model.DeletePolicyVersionRequest;
import software.amazon.awssdk.services.iot.model.DeletePolicyVersionResponse;
import software.amazon.awssdk.services.iot.model.DeleteProvisioningTemplateRequest;
import software.amazon.awssdk.services.iot.model.DeleteProvisioningTemplateResponse;
import software.amazon.awssdk.services.iot.model.DeleteProvisioningTemplateVersionRequest;
import software.amazon.awssdk.services.iot.model.DeleteProvisioningTemplateVersionResponse;
import software.amazon.awssdk.services.iot.model.DeleteRegistrationCodeRequest;
import software.amazon.awssdk.services.iot.model.DeleteRegistrationCodeResponse;
import software.amazon.awssdk.services.iot.model.DeleteRoleAliasRequest;
import software.amazon.awssdk.services.iot.model.DeleteRoleAliasResponse;
import software.amazon.awssdk.services.iot.model.DeleteScheduledAuditRequest;
import software.amazon.awssdk.services.iot.model.DeleteScheduledAuditResponse;
import software.amazon.awssdk.services.iot.model.DeleteSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.DeleteSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.DeleteStreamRequest;
import software.amazon.awssdk.services.iot.model.DeleteStreamResponse;
import software.amazon.awssdk.services.iot.model.DeleteThingGroupRequest;
import software.amazon.awssdk.services.iot.model.DeleteThingGroupResponse;
import software.amazon.awssdk.services.iot.model.DeleteThingRequest;
import software.amazon.awssdk.services.iot.model.DeleteThingResponse;
import software.amazon.awssdk.services.iot.model.DeleteThingTypeRequest;
import software.amazon.awssdk.services.iot.model.DeleteThingTypeResponse;
import software.amazon.awssdk.services.iot.model.DeleteTopicRuleDestinationRequest;
import software.amazon.awssdk.services.iot.model.DeleteTopicRuleDestinationResponse;
import software.amazon.awssdk.services.iot.model.DeleteTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.DeleteTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.DeleteV2LoggingLevelRequest;
import software.amazon.awssdk.services.iot.model.DeleteV2LoggingLevelResponse;
import software.amazon.awssdk.services.iot.model.DeprecateThingTypeRequest;
import software.amazon.awssdk.services.iot.model.DeprecateThingTypeResponse;
import software.amazon.awssdk.services.iot.model.DescribeAccountAuditConfigurationRequest;
import software.amazon.awssdk.services.iot.model.DescribeAccountAuditConfigurationResponse;
import software.amazon.awssdk.services.iot.model.DescribeAuditFindingRequest;
import software.amazon.awssdk.services.iot.model.DescribeAuditFindingResponse;
import software.amazon.awssdk.services.iot.model.DescribeAuditMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.DescribeAuditMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.DescribeAuditSuppressionRequest;
import software.amazon.awssdk.services.iot.model.DescribeAuditSuppressionResponse;
import software.amazon.awssdk.services.iot.model.DescribeAuditTaskRequest;
import software.amazon.awssdk.services.iot.model.DescribeAuditTaskResponse;
import software.amazon.awssdk.services.iot.model.DescribeAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.DescribeAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.DescribeBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.DescribeBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.DescribeCaCertificateRequest;
import software.amazon.awssdk.services.iot.model.DescribeCaCertificateResponse;
import software.amazon.awssdk.services.iot.model.DescribeCertificateRequest;
import software.amazon.awssdk.services.iot.model.DescribeCertificateResponse;
import software.amazon.awssdk.services.iot.model.DescribeCustomMetricRequest;
import software.amazon.awssdk.services.iot.model.DescribeCustomMetricResponse;
import software.amazon.awssdk.services.iot.model.DescribeDefaultAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.DescribeDefaultAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.DescribeDetectMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.DescribeDetectMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.DescribeDimensionRequest;
import software.amazon.awssdk.services.iot.model.DescribeDimensionResponse;
import software.amazon.awssdk.services.iot.model.DescribeDomainConfigurationRequest;
import software.amazon.awssdk.services.iot.model.DescribeDomainConfigurationResponse;
import software.amazon.awssdk.services.iot.model.DescribeEndpointRequest;
import software.amazon.awssdk.services.iot.model.DescribeEndpointResponse;
import software.amazon.awssdk.services.iot.model.DescribeEventConfigurationsRequest;
import software.amazon.awssdk.services.iot.model.DescribeEventConfigurationsResponse;
import software.amazon.awssdk.services.iot.model.DescribeFleetMetricRequest;
import software.amazon.awssdk.services.iot.model.DescribeFleetMetricResponse;
import software.amazon.awssdk.services.iot.model.DescribeIndexRequest;
import software.amazon.awssdk.services.iot.model.DescribeIndexResponse;
import software.amazon.awssdk.services.iot.model.DescribeJobExecutionRequest;
import software.amazon.awssdk.services.iot.model.DescribeJobExecutionResponse;
import software.amazon.awssdk.services.iot.model.DescribeJobRequest;
import software.amazon.awssdk.services.iot.model.DescribeJobResponse;
import software.amazon.awssdk.services.iot.model.DescribeJobTemplateRequest;
import software.amazon.awssdk.services.iot.model.DescribeJobTemplateResponse;
import software.amazon.awssdk.services.iot.model.DescribeManagedJobTemplateRequest;
import software.amazon.awssdk.services.iot.model.DescribeManagedJobTemplateResponse;
import software.amazon.awssdk.services.iot.model.DescribeMitigationActionRequest;
import software.amazon.awssdk.services.iot.model.DescribeMitigationActionResponse;
import software.amazon.awssdk.services.iot.model.DescribeProvisioningTemplateRequest;
import software.amazon.awssdk.services.iot.model.DescribeProvisioningTemplateResponse;
import software.amazon.awssdk.services.iot.model.DescribeProvisioningTemplateVersionRequest;
import software.amazon.awssdk.services.iot.model.DescribeProvisioningTemplateVersionResponse;
import software.amazon.awssdk.services.iot.model.DescribeRoleAliasRequest;
import software.amazon.awssdk.services.iot.model.DescribeRoleAliasResponse;
import software.amazon.awssdk.services.iot.model.DescribeScheduledAuditRequest;
import software.amazon.awssdk.services.iot.model.DescribeScheduledAuditResponse;
import software.amazon.awssdk.services.iot.model.DescribeSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.DescribeSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.DescribeStreamRequest;
import software.amazon.awssdk.services.iot.model.DescribeStreamResponse;
import software.amazon.awssdk.services.iot.model.DescribeThingGroupRequest;
import software.amazon.awssdk.services.iot.model.DescribeThingGroupResponse;
import software.amazon.awssdk.services.iot.model.DescribeThingRegistrationTaskRequest;
import software.amazon.awssdk.services.iot.model.DescribeThingRegistrationTaskResponse;
import software.amazon.awssdk.services.iot.model.DescribeThingRequest;
import software.amazon.awssdk.services.iot.model.DescribeThingResponse;
import software.amazon.awssdk.services.iot.model.DescribeThingTypeRequest;
import software.amazon.awssdk.services.iot.model.DescribeThingTypeResponse;
import software.amazon.awssdk.services.iot.model.DetachPolicyRequest;
import software.amazon.awssdk.services.iot.model.DetachPolicyResponse;
import software.amazon.awssdk.services.iot.model.DetachSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.DetachSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.DetachThingPrincipalRequest;
import software.amazon.awssdk.services.iot.model.DetachThingPrincipalResponse;
import software.amazon.awssdk.services.iot.model.DisableTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.DisableTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.EnableTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.EnableTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.GetBehaviorModelTrainingSummariesRequest;
import software.amazon.awssdk.services.iot.model.GetBehaviorModelTrainingSummariesResponse;
import software.amazon.awssdk.services.iot.model.GetBucketsAggregationRequest;
import software.amazon.awssdk.services.iot.model.GetBucketsAggregationResponse;
import software.amazon.awssdk.services.iot.model.GetCardinalityRequest;
import software.amazon.awssdk.services.iot.model.GetCardinalityResponse;
import software.amazon.awssdk.services.iot.model.GetEffectivePoliciesRequest;
import software.amazon.awssdk.services.iot.model.GetEffectivePoliciesResponse;
import software.amazon.awssdk.services.iot.model.GetIndexingConfigurationRequest;
import software.amazon.awssdk.services.iot.model.GetIndexingConfigurationResponse;
import software.amazon.awssdk.services.iot.model.GetJobDocumentRequest;
import software.amazon.awssdk.services.iot.model.GetJobDocumentResponse;
import software.amazon.awssdk.services.iot.model.GetLoggingOptionsRequest;
import software.amazon.awssdk.services.iot.model.GetLoggingOptionsResponse;
import software.amazon.awssdk.services.iot.model.GetOtaUpdateRequest;
import software.amazon.awssdk.services.iot.model.GetOtaUpdateResponse;
import software.amazon.awssdk.services.iot.model.GetPercentilesRequest;
import software.amazon.awssdk.services.iot.model.GetPercentilesResponse;
import software.amazon.awssdk.services.iot.model.GetPolicyRequest;
import software.amazon.awssdk.services.iot.model.GetPolicyResponse;
import software.amazon.awssdk.services.iot.model.GetPolicyVersionRequest;
import software.amazon.awssdk.services.iot.model.GetPolicyVersionResponse;
import software.amazon.awssdk.services.iot.model.GetRegistrationCodeRequest;
import software.amazon.awssdk.services.iot.model.GetRegistrationCodeResponse;
import software.amazon.awssdk.services.iot.model.GetStatisticsRequest;
import software.amazon.awssdk.services.iot.model.GetStatisticsResponse;
import software.amazon.awssdk.services.iot.model.GetTopicRuleDestinationRequest;
import software.amazon.awssdk.services.iot.model.GetTopicRuleDestinationResponse;
import software.amazon.awssdk.services.iot.model.GetTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.GetTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.GetV2LoggingOptionsRequest;
import software.amazon.awssdk.services.iot.model.GetV2LoggingOptionsResponse;
import software.amazon.awssdk.services.iot.model.IndexNotReadyException;
import software.amazon.awssdk.services.iot.model.InternalException;
import software.amazon.awssdk.services.iot.model.InternalFailureException;
import software.amazon.awssdk.services.iot.model.InternalServerException;
import software.amazon.awssdk.services.iot.model.InvalidAggregationException;
import software.amazon.awssdk.services.iot.model.InvalidQueryException;
import software.amazon.awssdk.services.iot.model.InvalidRequestException;
import software.amazon.awssdk.services.iot.model.InvalidResponseException;
import software.amazon.awssdk.services.iot.model.InvalidStateTransitionException;
import software.amazon.awssdk.services.iot.model.IotException;
import software.amazon.awssdk.services.iot.model.IotRequest;
import software.amazon.awssdk.services.iot.model.LimitExceededException;
import software.amazon.awssdk.services.iot.model.ListActiveViolationsRequest;
import software.amazon.awssdk.services.iot.model.ListActiveViolationsResponse;
import software.amazon.awssdk.services.iot.model.ListAttachedPoliciesRequest;
import software.amazon.awssdk.services.iot.model.ListAttachedPoliciesResponse;
import software.amazon.awssdk.services.iot.model.ListAuditFindingsRequest;
import software.amazon.awssdk.services.iot.model.ListAuditFindingsResponse;
import software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsExecutionsRequest;
import software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsExecutionsResponse;
import software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsTasksRequest;
import software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsTasksResponse;
import software.amazon.awssdk.services.iot.model.ListAuditSuppressionsRequest;
import software.amazon.awssdk.services.iot.model.ListAuditSuppressionsResponse;
import software.amazon.awssdk.services.iot.model.ListAuditTasksRequest;
import software.amazon.awssdk.services.iot.model.ListAuditTasksResponse;
import software.amazon.awssdk.services.iot.model.ListAuthorizersRequest;
import software.amazon.awssdk.services.iot.model.ListAuthorizersResponse;
import software.amazon.awssdk.services.iot.model.ListBillingGroupsRequest;
import software.amazon.awssdk.services.iot.model.ListBillingGroupsResponse;
import software.amazon.awssdk.services.iot.model.ListCaCertificatesRequest;
import software.amazon.awssdk.services.iot.model.ListCaCertificatesResponse;
import software.amazon.awssdk.services.iot.model.ListCertificatesByCaRequest;
import software.amazon.awssdk.services.iot.model.ListCertificatesByCaResponse;
import software.amazon.awssdk.services.iot.model.ListCertificatesRequest;
import software.amazon.awssdk.services.iot.model.ListCertificatesResponse;
import software.amazon.awssdk.services.iot.model.ListCustomMetricsRequest;
import software.amazon.awssdk.services.iot.model.ListCustomMetricsResponse;
import software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsExecutionsRequest;
import software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsExecutionsResponse;
import software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsTasksRequest;
import software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsTasksResponse;
import software.amazon.awssdk.services.iot.model.ListDimensionsRequest;
import software.amazon.awssdk.services.iot.model.ListDimensionsResponse;
import software.amazon.awssdk.services.iot.model.ListDomainConfigurationsRequest;
import software.amazon.awssdk.services.iot.model.ListDomainConfigurationsResponse;
import software.amazon.awssdk.services.iot.model.ListFleetMetricsRequest;
import software.amazon.awssdk.services.iot.model.ListFleetMetricsResponse;
import software.amazon.awssdk.services.iot.model.ListIndicesRequest;
import software.amazon.awssdk.services.iot.model.ListIndicesResponse;
import software.amazon.awssdk.services.iot.model.ListJobExecutionsForJobRequest;
import software.amazon.awssdk.services.iot.model.ListJobExecutionsForJobResponse;
import software.amazon.awssdk.services.iot.model.ListJobExecutionsForThingRequest;
import software.amazon.awssdk.services.iot.model.ListJobExecutionsForThingResponse;
import software.amazon.awssdk.services.iot.model.ListJobTemplatesRequest;
import software.amazon.awssdk.services.iot.model.ListJobTemplatesResponse;
import software.amazon.awssdk.services.iot.model.ListJobsRequest;
import software.amazon.awssdk.services.iot.model.ListJobsResponse;
import software.amazon.awssdk.services.iot.model.ListManagedJobTemplatesRequest;
import software.amazon.awssdk.services.iot.model.ListManagedJobTemplatesResponse;
import software.amazon.awssdk.services.iot.model.ListMetricValuesRequest;
import software.amazon.awssdk.services.iot.model.ListMetricValuesResponse;
import software.amazon.awssdk.services.iot.model.ListMitigationActionsRequest;
import software.amazon.awssdk.services.iot.model.ListMitigationActionsResponse;
import software.amazon.awssdk.services.iot.model.ListOtaUpdatesRequest;
import software.amazon.awssdk.services.iot.model.ListOtaUpdatesResponse;
import software.amazon.awssdk.services.iot.model.ListOutgoingCertificatesRequest;
import software.amazon.awssdk.services.iot.model.ListOutgoingCertificatesResponse;
import software.amazon.awssdk.services.iot.model.ListPoliciesRequest;
import software.amazon.awssdk.services.iot.model.ListPoliciesResponse;
import software.amazon.awssdk.services.iot.model.ListPolicyVersionsRequest;
import software.amazon.awssdk.services.iot.model.ListPolicyVersionsResponse;
import software.amazon.awssdk.services.iot.model.ListPrincipalThingsRequest;
import software.amazon.awssdk.services.iot.model.ListPrincipalThingsResponse;
import software.amazon.awssdk.services.iot.model.ListProvisioningTemplateVersionsRequest;
import software.amazon.awssdk.services.iot.model.ListProvisioningTemplateVersionsResponse;
import software.amazon.awssdk.services.iot.model.ListProvisioningTemplatesRequest;
import software.amazon.awssdk.services.iot.model.ListProvisioningTemplatesResponse;
import software.amazon.awssdk.services.iot.model.ListRoleAliasesRequest;
import software.amazon.awssdk.services.iot.model.ListRoleAliasesResponse;
import software.amazon.awssdk.services.iot.model.ListScheduledAuditsRequest;
import software.amazon.awssdk.services.iot.model.ListScheduledAuditsResponse;
import software.amazon.awssdk.services.iot.model.ListSecurityProfilesForTargetRequest;
import software.amazon.awssdk.services.iot.model.ListSecurityProfilesForTargetResponse;
import software.amazon.awssdk.services.iot.model.ListSecurityProfilesRequest;
import software.amazon.awssdk.services.iot.model.ListSecurityProfilesResponse;
import software.amazon.awssdk.services.iot.model.ListStreamsRequest;
import software.amazon.awssdk.services.iot.model.ListStreamsResponse;
import software.amazon.awssdk.services.iot.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.iot.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.iot.model.ListTargetsForPolicyRequest;
import software.amazon.awssdk.services.iot.model.ListTargetsForPolicyResponse;
import software.amazon.awssdk.services.iot.model.ListTargetsForSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.ListTargetsForSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.ListThingGroupsForThingRequest;
import software.amazon.awssdk.services.iot.model.ListThingGroupsForThingResponse;
import software.amazon.awssdk.services.iot.model.ListThingGroupsRequest;
import software.amazon.awssdk.services.iot.model.ListThingGroupsResponse;
import software.amazon.awssdk.services.iot.model.ListThingPrincipalsRequest;
import software.amazon.awssdk.services.iot.model.ListThingPrincipalsResponse;
import software.amazon.awssdk.services.iot.model.ListThingRegistrationTaskReportsRequest;
import software.amazon.awssdk.services.iot.model.ListThingRegistrationTaskReportsResponse;
import software.amazon.awssdk.services.iot.model.ListThingRegistrationTasksRequest;
import software.amazon.awssdk.services.iot.model.ListThingRegistrationTasksResponse;
import software.amazon.awssdk.services.iot.model.ListThingTypesRequest;
import software.amazon.awssdk.services.iot.model.ListThingTypesResponse;
import software.amazon.awssdk.services.iot.model.ListThingsInBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.ListThingsInBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.ListThingsInThingGroupRequest;
import software.amazon.awssdk.services.iot.model.ListThingsInThingGroupResponse;
import software.amazon.awssdk.services.iot.model.ListThingsRequest;
import software.amazon.awssdk.services.iot.model.ListThingsResponse;
import software.amazon.awssdk.services.iot.model.ListTopicRuleDestinationsRequest;
import software.amazon.awssdk.services.iot.model.ListTopicRuleDestinationsResponse;
import software.amazon.awssdk.services.iot.model.ListTopicRulesRequest;
import software.amazon.awssdk.services.iot.model.ListTopicRulesResponse;
import software.amazon.awssdk.services.iot.model.ListV2LoggingLevelsRequest;
import software.amazon.awssdk.services.iot.model.ListV2LoggingLevelsResponse;
import software.amazon.awssdk.services.iot.model.ListViolationEventsRequest;
import software.amazon.awssdk.services.iot.model.ListViolationEventsResponse;
import software.amazon.awssdk.services.iot.model.MalformedPolicyException;
import software.amazon.awssdk.services.iot.model.NotConfiguredException;
import software.amazon.awssdk.services.iot.model.PutVerificationStateOnViolationRequest;
import software.amazon.awssdk.services.iot.model.PutVerificationStateOnViolationResponse;
import software.amazon.awssdk.services.iot.model.RegisterCaCertificateRequest;
import software.amazon.awssdk.services.iot.model.RegisterCaCertificateResponse;
import software.amazon.awssdk.services.iot.model.RegisterCertificateRequest;
import software.amazon.awssdk.services.iot.model.RegisterCertificateResponse;
import software.amazon.awssdk.services.iot.model.RegisterCertificateWithoutCaRequest;
import software.amazon.awssdk.services.iot.model.RegisterCertificateWithoutCaResponse;
import software.amazon.awssdk.services.iot.model.RegisterThingRequest;
import software.amazon.awssdk.services.iot.model.RegisterThingResponse;
import software.amazon.awssdk.services.iot.model.RegistrationCodeValidationException;
import software.amazon.awssdk.services.iot.model.RejectCertificateTransferRequest;
import software.amazon.awssdk.services.iot.model.RejectCertificateTransferResponse;
import software.amazon.awssdk.services.iot.model.RemoveThingFromBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.RemoveThingFromBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.RemoveThingFromThingGroupRequest;
import software.amazon.awssdk.services.iot.model.RemoveThingFromThingGroupResponse;
import software.amazon.awssdk.services.iot.model.ReplaceTopicRuleRequest;
import software.amazon.awssdk.services.iot.model.ReplaceTopicRuleResponse;
import software.amazon.awssdk.services.iot.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.iot.model.ResourceNotFoundException;
import software.amazon.awssdk.services.iot.model.ResourceRegistrationFailureException;
import software.amazon.awssdk.services.iot.model.SearchIndexRequest;
import software.amazon.awssdk.services.iot.model.SearchIndexResponse;
import software.amazon.awssdk.services.iot.model.ServiceUnavailableException;
import software.amazon.awssdk.services.iot.model.SetDefaultAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.SetDefaultAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.SetDefaultPolicyVersionRequest;
import software.amazon.awssdk.services.iot.model.SetDefaultPolicyVersionResponse;
import software.amazon.awssdk.services.iot.model.SetLoggingOptionsRequest;
import software.amazon.awssdk.services.iot.model.SetLoggingOptionsResponse;
import software.amazon.awssdk.services.iot.model.SetV2LoggingLevelRequest;
import software.amazon.awssdk.services.iot.model.SetV2LoggingLevelResponse;
import software.amazon.awssdk.services.iot.model.SetV2LoggingOptionsRequest;
import software.amazon.awssdk.services.iot.model.SetV2LoggingOptionsResponse;
import software.amazon.awssdk.services.iot.model.SqlParseException;
import software.amazon.awssdk.services.iot.model.StartAuditMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.StartAuditMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.StartDetectMitigationActionsTaskRequest;
import software.amazon.awssdk.services.iot.model.StartDetectMitigationActionsTaskResponse;
import software.amazon.awssdk.services.iot.model.StartOnDemandAuditTaskRequest;
import software.amazon.awssdk.services.iot.model.StartOnDemandAuditTaskResponse;
import software.amazon.awssdk.services.iot.model.StartThingRegistrationTaskRequest;
import software.amazon.awssdk.services.iot.model.StartThingRegistrationTaskResponse;
import software.amazon.awssdk.services.iot.model.StopThingRegistrationTaskRequest;
import software.amazon.awssdk.services.iot.model.StopThingRegistrationTaskResponse;
import software.amazon.awssdk.services.iot.model.TagResourceRequest;
import software.amazon.awssdk.services.iot.model.TagResourceResponse;
import software.amazon.awssdk.services.iot.model.TaskAlreadyExistsException;
import software.amazon.awssdk.services.iot.model.TestAuthorizationRequest;
import software.amazon.awssdk.services.iot.model.TestAuthorizationResponse;
import software.amazon.awssdk.services.iot.model.TestInvokeAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.TestInvokeAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.ThrottlingException;
import software.amazon.awssdk.services.iot.model.TransferAlreadyCompletedException;
import software.amazon.awssdk.services.iot.model.TransferCertificateRequest;
import software.amazon.awssdk.services.iot.model.TransferCertificateResponse;
import software.amazon.awssdk.services.iot.model.TransferConflictException;
import software.amazon.awssdk.services.iot.model.UnauthorizedException;
import software.amazon.awssdk.services.iot.model.UntagResourceRequest;
import software.amazon.awssdk.services.iot.model.UntagResourceResponse;
import software.amazon.awssdk.services.iot.model.UpdateAccountAuditConfigurationRequest;
import software.amazon.awssdk.services.iot.model.UpdateAccountAuditConfigurationResponse;
import software.amazon.awssdk.services.iot.model.UpdateAuditSuppressionRequest;
import software.amazon.awssdk.services.iot.model.UpdateAuditSuppressionResponse;
import software.amazon.awssdk.services.iot.model.UpdateAuthorizerRequest;
import software.amazon.awssdk.services.iot.model.UpdateAuthorizerResponse;
import software.amazon.awssdk.services.iot.model.UpdateBillingGroupRequest;
import software.amazon.awssdk.services.iot.model.UpdateBillingGroupResponse;
import software.amazon.awssdk.services.iot.model.UpdateCaCertificateRequest;
import software.amazon.awssdk.services.iot.model.UpdateCaCertificateResponse;
import software.amazon.awssdk.services.iot.model.UpdateCertificateRequest;
import software.amazon.awssdk.services.iot.model.UpdateCertificateResponse;
import software.amazon.awssdk.services.iot.model.UpdateCustomMetricRequest;
import software.amazon.awssdk.services.iot.model.UpdateCustomMetricResponse;
import software.amazon.awssdk.services.iot.model.UpdateDimensionRequest;
import software.amazon.awssdk.services.iot.model.UpdateDimensionResponse;
import software.amazon.awssdk.services.iot.model.UpdateDomainConfigurationRequest;
import software.amazon.awssdk.services.iot.model.UpdateDomainConfigurationResponse;
import software.amazon.awssdk.services.iot.model.UpdateDynamicThingGroupRequest;
import software.amazon.awssdk.services.iot.model.UpdateDynamicThingGroupResponse;
import software.amazon.awssdk.services.iot.model.UpdateEventConfigurationsRequest;
import software.amazon.awssdk.services.iot.model.UpdateEventConfigurationsResponse;
import software.amazon.awssdk.services.iot.model.UpdateFleetMetricRequest;
import software.amazon.awssdk.services.iot.model.UpdateFleetMetricResponse;
import software.amazon.awssdk.services.iot.model.UpdateIndexingConfigurationRequest;
import software.amazon.awssdk.services.iot.model.UpdateIndexingConfigurationResponse;
import software.amazon.awssdk.services.iot.model.UpdateJobRequest;
import software.amazon.awssdk.services.iot.model.UpdateJobResponse;
import software.amazon.awssdk.services.iot.model.UpdateMitigationActionRequest;
import software.amazon.awssdk.services.iot.model.UpdateMitigationActionResponse;
import software.amazon.awssdk.services.iot.model.UpdateProvisioningTemplateRequest;
import software.amazon.awssdk.services.iot.model.UpdateProvisioningTemplateResponse;
import software.amazon.awssdk.services.iot.model.UpdateRoleAliasRequest;
import software.amazon.awssdk.services.iot.model.UpdateRoleAliasResponse;
import software.amazon.awssdk.services.iot.model.UpdateScheduledAuditRequest;
import software.amazon.awssdk.services.iot.model.UpdateScheduledAuditResponse;
import software.amazon.awssdk.services.iot.model.UpdateSecurityProfileRequest;
import software.amazon.awssdk.services.iot.model.UpdateSecurityProfileResponse;
import software.amazon.awssdk.services.iot.model.UpdateStreamRequest;
import software.amazon.awssdk.services.iot.model.UpdateStreamResponse;
import software.amazon.awssdk.services.iot.model.UpdateThingGroupRequest;
import software.amazon.awssdk.services.iot.model.UpdateThingGroupResponse;
import software.amazon.awssdk.services.iot.model.UpdateThingGroupsForThingRequest;
import software.amazon.awssdk.services.iot.model.UpdateThingGroupsForThingResponse;
import software.amazon.awssdk.services.iot.model.UpdateThingRequest;
import software.amazon.awssdk.services.iot.model.UpdateThingResponse;
import software.amazon.awssdk.services.iot.model.UpdateTopicRuleDestinationRequest;
import software.amazon.awssdk.services.iot.model.UpdateTopicRuleDestinationResponse;
import software.amazon.awssdk.services.iot.model.ValidateSecurityProfileBehaviorsRequest;
import software.amazon.awssdk.services.iot.model.ValidateSecurityProfileBehaviorsResponse;
import software.amazon.awssdk.services.iot.model.VersionConflictException;
import software.amazon.awssdk.services.iot.model.VersionsLimitExceededException;
import software.amazon.awssdk.services.iot.paginators.GetBehaviorModelTrainingSummariesIterable;
import software.amazon.awssdk.services.iot.paginators.ListActiveViolationsIterable;
import software.amazon.awssdk.services.iot.paginators.ListAttachedPoliciesIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuditFindingsIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsExecutionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsTasksIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuditSuppressionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuditTasksIterable;
import software.amazon.awssdk.services.iot.paginators.ListAuthorizersIterable;
import software.amazon.awssdk.services.iot.paginators.ListBillingGroupsIterable;
import software.amazon.awssdk.services.iot.paginators.ListCACertificatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListCertificatesByCAIterable;
import software.amazon.awssdk.services.iot.paginators.ListCertificatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListCustomMetricsIterable;
import software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsExecutionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsTasksIterable;
import software.amazon.awssdk.services.iot.paginators.ListDimensionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListDomainConfigurationsIterable;
import software.amazon.awssdk.services.iot.paginators.ListFleetMetricsIterable;
import software.amazon.awssdk.services.iot.paginators.ListIndicesIterable;
import software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForJobIterable;
import software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForThingIterable;
import software.amazon.awssdk.services.iot.paginators.ListJobTemplatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListJobsIterable;
import software.amazon.awssdk.services.iot.paginators.ListMetricValuesIterable;
import software.amazon.awssdk.services.iot.paginators.ListMitigationActionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListOTAUpdatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListOutgoingCertificatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListPoliciesIterable;
import software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsIterable;
import software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsIterable;
import software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplatesIterable;
import software.amazon.awssdk.services.iot.paginators.ListRoleAliasesIterable;
import software.amazon.awssdk.services.iot.paginators.ListScheduledAuditsIterable;
import software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesForTargetIterable;
import software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesIterable;
import software.amazon.awssdk.services.iot.paginators.ListStreamsIterable;
import software.amazon.awssdk.services.iot.paginators.ListTagsForResourceIterable;
import software.amazon.awssdk.services.iot.paginators.ListTargetsForPolicyIterable;
import software.amazon.awssdk.services.iot.paginators.ListTargetsForSecurityProfileIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingGroupsForThingIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingGroupsIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingPrincipalsIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTaskReportsIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTasksIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingTypesIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingsInBillingGroupIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingsInThingGroupIterable;
import software.amazon.awssdk.services.iot.paginators.ListThingsIterable;
import software.amazon.awssdk.services.iot.paginators.ListTopicRuleDestinationsIterable;
import software.amazon.awssdk.services.iot.paginators.ListTopicRulesIterable;
import software.amazon.awssdk.services.iot.paginators.ListV2LoggingLevelsIterable;
import software.amazon.awssdk.services.iot.paginators.ListViolationEventsIterable;
import software.amazon.awssdk.services.iot.transform.AcceptCertificateTransferRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AddThingToBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AddThingToThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AssociateTargetsWithJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AttachPolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AttachSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.AttachThingPrincipalRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelAuditMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelAuditTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelCertificateTransferRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelDetectMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelJobExecutionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CancelJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ClearDefaultAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ConfirmTopicRuleDestinationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateAuditSuppressionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateCertificateFromCsrRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateCustomMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateDimensionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateDomainConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateDynamicThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateFleetMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateJobTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateKeysAndCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateMitigationActionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateOtaUpdateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreatePolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreatePolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateProvisioningClaimRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateProvisioningTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateProvisioningTemplateVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateRoleAliasRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateScheduledAuditRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateStreamRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateThingTypeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateTopicRuleDestinationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.CreateTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteAccountAuditConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteAuditSuppressionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteCaCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteCustomMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteDimensionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteDomainConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteDynamicThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteFleetMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteJobExecutionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteJobTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteMitigationActionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteOtaUpdateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeletePolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeletePolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteProvisioningTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteProvisioningTemplateVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteRegistrationCodeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteRoleAliasRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteScheduledAuditRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteStreamRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteThingTypeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteTopicRuleDestinationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeleteV2LoggingLevelRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DeprecateThingTypeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAccountAuditConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAuditFindingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAuditMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAuditSuppressionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAuditTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeCaCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeCustomMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeDefaultAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeDetectMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeDimensionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeDomainConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeEndpointRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeEventConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeFleetMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeIndexRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeJobExecutionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeJobTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeManagedJobTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeMitigationActionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeProvisioningTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeProvisioningTemplateVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeRoleAliasRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeScheduledAuditRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeStreamRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeThingRegistrationTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DescribeThingTypeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DetachPolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DetachSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DetachThingPrincipalRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.DisableTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.EnableTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetBehaviorModelTrainingSummariesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetBucketsAggregationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetCardinalityRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetEffectivePoliciesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetIndexingConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetJobDocumentRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetOtaUpdateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetPercentilesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetPolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetRegistrationCodeRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetStatisticsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetTopicRuleDestinationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.GetV2LoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListActiveViolationsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAttachedPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuditFindingsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuditMitigationActionsExecutionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuditMitigationActionsTasksRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuditSuppressionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuditTasksRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListAuthorizersRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListBillingGroupsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListCaCertificatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListCertificatesByCaRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListCertificatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListCustomMetricsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListDetectMitigationActionsExecutionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListDetectMitigationActionsTasksRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListDimensionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListDomainConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListFleetMetricsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListIndicesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListJobExecutionsForJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListJobExecutionsForThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListJobTemplatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListJobsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListManagedJobTemplatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListMetricValuesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListMitigationActionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListOtaUpdatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListOutgoingCertificatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListPoliciesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListPolicyVersionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListPrincipalThingsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListProvisioningTemplateVersionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListProvisioningTemplatesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListRoleAliasesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListScheduledAuditsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListSecurityProfilesForTargetRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListSecurityProfilesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListStreamsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListTargetsForPolicyRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListTargetsForSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingGroupsForThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingGroupsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingPrincipalsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingRegistrationTaskReportsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingRegistrationTasksRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingTypesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingsInBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingsInThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListThingsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListTopicRuleDestinationsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListTopicRulesRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListV2LoggingLevelsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ListViolationEventsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.PutVerificationStateOnViolationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RegisterCaCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RegisterCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RegisterCertificateWithoutCaRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RegisterThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RejectCertificateTransferRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RemoveThingFromBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.RemoveThingFromThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ReplaceTopicRuleRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SearchIndexRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SetDefaultAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SetDefaultPolicyVersionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SetLoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SetV2LoggingLevelRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.SetV2LoggingOptionsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.StartAuditMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.StartDetectMitigationActionsTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.StartOnDemandAuditTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.StartThingRegistrationTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.StopThingRegistrationTaskRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.TestAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.TestInvokeAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.TransferCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateAccountAuditConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateAuditSuppressionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateAuthorizerRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateBillingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateCaCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateCertificateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateCustomMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateDimensionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateDomainConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateDynamicThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateEventConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateFleetMetricRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateIndexingConfigurationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateJobRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateMitigationActionRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateProvisioningTemplateRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateRoleAliasRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateScheduledAuditRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateSecurityProfileRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateStreamRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateThingGroupRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateThingGroupsForThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateThingRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.UpdateTopicRuleDestinationRequestMarshaller;
import software.amazon.awssdk.services.iot.transform.ValidateSecurityProfileBehaviorsRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link IotClient}.
*
* @see IotClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultIotClient implements IotClient {
private static final Logger log = Logger.loggerFor(DefaultIotClient.class);
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultIotClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AcceptCertificateTransfer
*/
@Override
public AcceptCertificateTransferResponse acceptCertificateTransfer(
AcceptCertificateTransferRequest acceptCertificateTransferRequest) throws ResourceNotFoundException,
TransferAlreadyCompletedException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AcceptCertificateTransferResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, acceptCertificateTransferRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptCertificateTransfer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AcceptCertificateTransfer").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(acceptCertificateTransferRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AcceptCertificateTransferRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AddThingToBillingGroup
*/
@Override
public AddThingToBillingGroupResponse addThingToBillingGroup(AddThingToBillingGroupRequest addThingToBillingGroupRequest)
throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AddThingToBillingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, addThingToBillingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddThingToBillingGroup");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AddThingToBillingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(addThingToBillingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AddThingToBillingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AddThingToThingGroup
*/
@Override
public AddThingToThingGroupResponse addThingToThingGroup(AddThingToThingGroupRequest addThingToThingGroupRequest)
throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AddThingToThingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, addThingToThingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddThingToThingGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AddThingToThingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(addThingToThingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AddThingToThingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AssociateTargetsWithJob
*/
@Override
public AssociateTargetsWithJobResponse associateTargetsWithJob(AssociateTargetsWithJobRequest associateTargetsWithJobRequest)
throws InvalidRequestException, ResourceNotFoundException, LimitExceededException, ThrottlingException,
ServiceUnavailableException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateTargetsWithJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateTargetsWithJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateTargetsWithJob");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateTargetsWithJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(associateTargetsWithJobRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateTargetsWithJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AttachPolicy
*/
@Override
public AttachPolicyResponse attachPolicy(AttachPolicyRequest attachPolicyRequest) throws ResourceNotFoundException,
InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AttachPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(attachPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachPolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AttachSecurityProfile
*/
@Override
public AttachSecurityProfileResponse attachSecurityProfile(AttachSecurityProfileRequest attachSecurityProfileRequest)
throws InvalidRequestException, ResourceNotFoundException, LimitExceededException, VersionConflictException,
ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AttachSecurityProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachSecurityProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachSecurityProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachSecurityProfile").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(attachSecurityProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachSecurityProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.AttachThingPrincipal
*/
@Override
public AttachThingPrincipalResponse attachThingPrincipal(AttachThingPrincipalRequest attachThingPrincipalRequest)
throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AttachThingPrincipalResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, attachThingPrincipalRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AttachThingPrincipal");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AttachThingPrincipal").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(attachThingPrincipalRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AttachThingPrincipalRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelAuditMitigationActionsTask
*/
@Override
public CancelAuditMitigationActionsTaskResponse cancelAuditMitigationActionsTask(
CancelAuditMitigationActionsTaskRequest cancelAuditMitigationActionsTaskRequest) throws ResourceNotFoundException,
InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException,
IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CancelAuditMitigationActionsTaskResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
cancelAuditMitigationActionsTaskRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelAuditMitigationActionsTask");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CancelAuditMitigationActionsTask").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelAuditMitigationActionsTaskRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelAuditMitigationActionsTaskRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelAuditTask
*/
@Override
public CancelAuditTaskResponse cancelAuditTask(CancelAuditTaskRequest cancelAuditTaskRequest)
throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CancelAuditTaskResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelAuditTaskRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelAuditTask");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CancelAuditTask").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelAuditTaskRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelAuditTaskRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelCertificateTransfer
*/
@Override
public CancelCertificateTransferResponse cancelCertificateTransfer(
CancelCertificateTransferRequest cancelCertificateTransferRequest) throws ResourceNotFoundException,
TransferAlreadyCompletedException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CancelCertificateTransferResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelCertificateTransferRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelCertificateTransfer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CancelCertificateTransfer").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelCertificateTransferRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelCertificateTransferRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelDetectMitigationActionsTask
*/
@Override
public CancelDetectMitigationActionsTaskResponse cancelDetectMitigationActionsTask(
CancelDetectMitigationActionsTaskRequest cancelDetectMitigationActionsTaskRequest) throws ResourceNotFoundException,
InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException,
IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CancelDetectMitigationActionsTaskResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
cancelDetectMitigationActionsTaskRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelDetectMitigationActionsTask");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CancelDetectMitigationActionsTask").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelDetectMitigationActionsTaskRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelDetectMitigationActionsTaskRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelJob
*/
@Override
public CancelJobResponse cancelJob(CancelJobRequest cancelJobRequest) throws InvalidRequestException,
ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, LimitExceededException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CancelJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CancelJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelJobRequest)
.withMetricCollector(apiCallMetricCollector).withMarshaller(new CancelJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CancelJobExecution
*/
@Override
public CancelJobExecutionResponse cancelJobExecution(CancelJobExecutionRequest cancelJobExecutionRequest)
throws InvalidRequestException, InvalidStateTransitionException, ResourceNotFoundException, ThrottlingException,
ServiceUnavailableException, VersionConflictException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CancelJobExecutionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelJobExecutionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelJobExecution");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CancelJobExecution").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cancelJobExecutionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CancelJobExecutionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.ClearDefaultAuthorizer
*/
@Override
public ClearDefaultAuthorizerResponse clearDefaultAuthorizer(ClearDefaultAuthorizerRequest clearDefaultAuthorizerRequest)
throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ClearDefaultAuthorizerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, clearDefaultAuthorizerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ClearDefaultAuthorizer");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ClearDefaultAuthorizer").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(clearDefaultAuthorizerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ClearDefaultAuthorizerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.ConfirmTopicRuleDestination
*/
@Override
public ConfirmTopicRuleDestinationResponse confirmTopicRuleDestination(
ConfirmTopicRuleDestinationRequest confirmTopicRuleDestinationRequest) throws InternalException,
InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ConfirmTopicRuleDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, confirmTopicRuleDestinationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ConfirmTopicRuleDestination");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ConfirmTopicRuleDestination").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(confirmTopicRuleDestinationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ConfirmTopicRuleDestinationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateAuditSuppression
*/
@Override
public CreateAuditSuppressionResponse createAuditSuppression(CreateAuditSuppressionRequest createAuditSuppressionRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ThrottlingException, InternalFailureException,
LimitExceededException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateAuditSuppressionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createAuditSuppressionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAuditSuppression");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateAuditSuppression").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createAuditSuppressionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateAuditSuppressionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateAuthorizer
*/
@Override
public CreateAuthorizerResponse createAuthorizer(CreateAuthorizerRequest createAuthorizerRequest)
throws ResourceAlreadyExistsException, InvalidRequestException, LimitExceededException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateAuthorizerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createAuthorizerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAuthorizer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateAuthorizer").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createAuthorizerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateAuthorizerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateBillingGroup
*/
@Override
public CreateBillingGroupResponse createBillingGroup(CreateBillingGroupRequest createBillingGroupRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateBillingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createBillingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateBillingGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateBillingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createBillingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateBillingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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, NIST P-384, or NIST P-512 curves. For supported certificates, consult
* Certificate signing algorithms supported by IoT.
*
*
* Note: Reusing the same certificate signing request (CSR) results in a distinct certificate.
*
*
* Requires permission to access the CreateCertificateFromCsr action.
*
*
* 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 Amazon Web Services 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateCertificateFromCsr
*/
@Override
public CreateCertificateFromCsrResponse createCertificateFromCsr(
CreateCertificateFromCsrRequest createCertificateFromCsrRequest) throws InvalidRequestException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateCertificateFromCsrResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createCertificateFromCsrRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCertificateFromCsr");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCertificateFromCsr").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createCertificateFromCsrRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateCertificateFromCsrRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateCustomMetric
*/
@Override
public CreateCustomMetricResponse createCustomMetric(CreateCustomMetricRequest createCustomMetricRequest)
throws InvalidRequestException, LimitExceededException, ResourceAlreadyExistsException, ThrottlingException,
InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateCustomMetricResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createCustomMetricRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCustomMetric");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateCustomMetric").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createCustomMetricRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateCustomMetricRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateDimension
*/
@Override
public CreateDimensionResponse createDimension(CreateDimensionRequest createDimensionRequest)
throws InternalFailureException, InvalidRequestException, LimitExceededException, ResourceAlreadyExistsException,
ThrottlingException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateDimensionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDimensionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDimension");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateDimension").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createDimensionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDimensionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateDomainConfiguration
*/
@Override
public CreateDomainConfigurationResponse createDomainConfiguration(
CreateDomainConfigurationRequest createDomainConfigurationRequest) throws LimitExceededException,
CertificateValidationException, ResourceAlreadyExistsException, ServiceUnavailableException,
InternalFailureException, InvalidRequestException, UnauthorizedException, ThrottlingException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateDomainConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDomainConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDomainConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDomainConfiguration").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createDomainConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDomainConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateDynamicThingGroup
*/
@Override
public CreateDynamicThingGroupResponse createDynamicThingGroup(CreateDynamicThingGroupRequest createDynamicThingGroupRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ResourceNotFoundException, ThrottlingException,
InternalFailureException, InvalidQueryException, LimitExceededException, AwsServiceException, SdkClientException,
IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateDynamicThingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDynamicThingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDynamicThingGroup");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDynamicThingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createDynamicThingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateDynamicThingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateFleetMetric
*/
@Override
public CreateFleetMetricResponse createFleetMetric(CreateFleetMetricRequest createFleetMetricRequest)
throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
InternalFailureException, LimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException,
InvalidQueryException, InvalidAggregationException, IndexNotReadyException, AwsServiceException, SdkClientException,
IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateFleetMetricResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createFleetMetricRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateFleetMetric");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateFleetMetric").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createFleetMetricRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateFleetMetricRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateJob
*/
@Override
public CreateJobResponse createJob(CreateJobRequest createJobRequest) throws InvalidRequestException,
ResourceNotFoundException, ResourceAlreadyExistsException, LimitExceededException, ThrottlingException,
ServiceUnavailableException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createJobRequest)
.withMetricCollector(apiCallMetricCollector).withMarshaller(new CreateJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateJobTemplate
*/
@Override
public CreateJobTemplateResponse createJobTemplate(CreateJobTemplateRequest createJobTemplateRequest)
throws InvalidRequestException, ResourceNotFoundException, ConflictException, LimitExceededException,
ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateJobTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createJobTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateJobTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateJobTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createJobTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateJobTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateKeysAndCertificate
*/
@Override
public CreateKeysAndCertificateResponse createKeysAndCertificate(
CreateKeysAndCertificateRequest createKeysAndCertificateRequest) throws InvalidRequestException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateKeysAndCertificateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createKeysAndCertificateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateKeysAndCertificate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateKeysAndCertificate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createKeysAndCertificateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateKeysAndCertificateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateMitigationAction
*/
@Override
public CreateMitigationActionResponse createMitigationAction(CreateMitigationActionRequest createMitigationActionRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, LimitExceededException, ThrottlingException,
InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateMitigationActionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createMitigationActionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateMitigationAction");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateMitigationAction").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createMitigationActionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateMitigationActionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an IoT OTA update on a target group of things or groups.
*
*
* Requires permission to access the CreateOTAUpdate action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateOTAUpdate
*/
@Override
public CreateOtaUpdateResponse createOTAUpdate(CreateOtaUpdateRequest createOtaUpdateRequest) throws InvalidRequestException,
LimitExceededException, ResourceNotFoundException, ResourceAlreadyExistsException, ThrottlingException,
UnauthorizedException, InternalFailureException, ServiceUnavailableException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateOtaUpdateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createOtaUpdateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateOTAUpdate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateOTAUpdate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createOtaUpdateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateOtaUpdateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreatePolicy
*/
@Override
public CreatePolicyResponse createPolicy(CreatePolicyRequest createPolicyRequest) throws ResourceAlreadyExistsException,
MalformedPolicyException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreatePolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createPolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreatePolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreatePolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreatePolicyVersion
*/
@Override
public CreatePolicyVersionResponse createPolicyVersion(CreatePolicyVersionRequest createPolicyVersionRequest)
throws ResourceNotFoundException, MalformedPolicyException, VersionsLimitExceededException, InvalidRequestException,
ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreatePolicyVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createPolicyVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePolicyVersion");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreatePolicyVersion").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createPolicyVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreatePolicyVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a provisioning claim.
*
*
* Requires permission to access the CreateProvisioningClaim action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateProvisioningClaim
*/
@Override
public CreateProvisioningClaimResponse createProvisioningClaim(CreateProvisioningClaimRequest createProvisioningClaimRequest)
throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateProvisioningClaimResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createProvisioningClaimRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProvisioningClaim");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateProvisioningClaim").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createProvisioningClaimRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateProvisioningClaimRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a provisioning template.
*
*
* Requires permission to access the CreateProvisioningTemplate action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateProvisioningTemplate
*/
@Override
public CreateProvisioningTemplateResponse createProvisioningTemplate(
CreateProvisioningTemplateRequest createProvisioningTemplateRequest) throws InternalFailureException,
InvalidRequestException, LimitExceededException, ThrottlingException, UnauthorizedException,
ResourceAlreadyExistsException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateProvisioningTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createProvisioningTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProvisioningTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateProvisioningTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createProvisioningTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateProvisioningTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new version of a provisioning template.
*
*
* Requires permission to access the CreateProvisioningTemplateVersion action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateProvisioningTemplateVersion
*/
@Override
public CreateProvisioningTemplateVersionResponse createProvisioningTemplateVersion(
CreateProvisioningTemplateVersionRequest createProvisioningTemplateVersionRequest)
throws VersionsLimitExceededException, InternalFailureException, InvalidRequestException, ThrottlingException,
ResourceNotFoundException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateProvisioningTemplateVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createProvisioningTemplateVersionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateProvisioningTemplateVersion");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateProvisioningTemplateVersion").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createProvisioningTemplateVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateProvisioningTemplateVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a role alias.
*
*
* Requires permission to access the CreateRoleAlias action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateRoleAlias
*/
@Override
public CreateRoleAliasResponse createRoleAlias(CreateRoleAliasRequest createRoleAliasRequest)
throws ResourceAlreadyExistsException, InvalidRequestException, LimitExceededException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateRoleAliasResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createRoleAliasRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRoleAlias");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateRoleAlias").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createRoleAliasRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateRoleAliasRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a scheduled audit that is run at a specified time interval.
*
*
* Requires permission to access the CreateScheduledAudit action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateScheduledAudit
*/
@Override
public CreateScheduledAuditResponse createScheduledAudit(CreateScheduledAuditRequest createScheduledAuditRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ThrottlingException, InternalFailureException,
LimitExceededException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateScheduledAuditResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createScheduledAuditRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateScheduledAudit");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateScheduledAudit").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createScheduledAuditRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateScheduledAuditRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a Device Defender security profile.
*
*
* Requires permission to access the CreateSecurityProfile action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateSecurityProfile
*/
@Override
public CreateSecurityProfileResponse createSecurityProfile(CreateSecurityProfileRequest createSecurityProfileRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateSecurityProfileResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createSecurityProfileRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSecurityProfile");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSecurityProfile").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createSecurityProfileRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateSecurityProfileRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateStream
*/
@Override
public CreateStreamResponse createStream(CreateStreamRequest createStreamRequest) throws InvalidRequestException,
LimitExceededException, ResourceNotFoundException, ResourceAlreadyExistsException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateStreamResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createStreamRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStream");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateStream").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createStreamRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateStreamRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
*
* Requires permission to access the CreateThing action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateThing
*/
@Override
public CreateThingResponse createThing(CreateThingRequest createThingRequest) throws InvalidRequestException,
ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException,
ResourceAlreadyExistsException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateThingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createThingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateThing");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateThing").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createThingRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateThingRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateThingGroup
*/
@Override
public CreateThingGroupResponse createThingGroup(CreateThingGroupRequest createThingGroupRequest)
throws InvalidRequestException, ResourceAlreadyExistsException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateThingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createThingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateThingGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateThingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createThingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateThingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new thing type.
*
*
* Requires permission to access the CreateThingType action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateThingType
*/
@Override
public CreateThingTypeResponse createThingType(CreateThingTypeRequest createThingTypeRequest) throws InvalidRequestException,
ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException,
ResourceAlreadyExistsException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateThingTypeResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createThingTypeRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateThingType");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateThingType").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createThingTypeRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateThingTypeRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateTopicRule
*/
@Override
public CreateTopicRuleResponse createTopicRule(CreateTopicRuleRequest createTopicRuleRequest) throws SqlParseException,
InternalException, InvalidRequestException, ResourceAlreadyExistsException, ServiceUnavailableException,
ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateTopicRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTopicRuleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTopicRule");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTopicRule").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createTopicRuleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTopicRuleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a topic rule destination. The destination must be confirmed prior to use.
*
*
* Requires permission to access the CreateTopicRuleDestination action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.CreateTopicRuleDestination
*/
@Override
public CreateTopicRuleDestinationResponse createTopicRuleDestination(
CreateTopicRuleDestinationRequest createTopicRuleDestinationRequest) throws InternalException,
InvalidRequestException, ResourceAlreadyExistsException, ServiceUnavailableException,
ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateTopicRuleDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTopicRuleDestinationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTopicRuleDestination");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateTopicRuleDestination").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createTopicRuleDestinationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTopicRuleDestinationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteAccountAuditConfiguration
*/
@Override
public DeleteAccountAuditConfigurationResponse deleteAccountAuditConfiguration(
DeleteAccountAuditConfigurationRequest deleteAccountAuditConfigurationRequest) throws InvalidRequestException,
ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException,
IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteAccountAuditConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteAccountAuditConfigurationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccountAuditConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteAccountAuditConfiguration").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteAccountAuditConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAccountAuditConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a Device Defender audit suppression.
*
*
* Requires permission to access the DeleteAuditSuppression action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteAuditSuppression
*/
@Override
public DeleteAuditSuppressionResponse deleteAuditSuppression(DeleteAuditSuppressionRequest deleteAuditSuppressionRequest)
throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteAuditSuppressionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAuditSuppressionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAuditSuppression");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteAuditSuppression").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteAuditSuppressionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAuditSuppressionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes an authorizer.
*
*
* Requires permission to access the DeleteAuthorizer action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteAuthorizer
*/
@Override
public DeleteAuthorizerResponse deleteAuthorizer(DeleteAuthorizerRequest deleteAuthorizerRequest)
throws DeleteConflictException, ResourceNotFoundException, InvalidRequestException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteAuthorizerResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAuthorizerRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAuthorizer");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteAuthorizer").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteAuthorizerRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAuthorizerRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the billing group.
*
*
* Requires permission to access the DeleteBillingGroup action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteBillingGroup
*/
@Override
public DeleteBillingGroupResponse deleteBillingGroup(DeleteBillingGroupRequest deleteBillingGroupRequest)
throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteBillingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteBillingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteBillingGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteBillingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteBillingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteBillingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a registered CA certificate.
*
*
* Requires permission to access the DeleteCACertificate action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteCACertificate
*/
@Override
public DeleteCaCertificateResponse deleteCACertificate(DeleteCaCertificateRequest deleteCaCertificateRequest)
throws InvalidRequestException, CertificateStateException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteCaCertificateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCaCertificateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCACertificate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCACertificate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteCaCertificateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCaCertificateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteCertificate
*/
@Override
public DeleteCertificateResponse deleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
throws CertificateStateException, DeleteConflictException, InvalidRequestException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteCertificateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCertificateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCertificate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCertificate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteCertificateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCertificateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 metricName
set to your custom metric name.
*
*
*
* @param deleteCustomMetricRequest
* @return Result of the DeleteCustomMetric 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 SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteCustomMetric
*/
@Override
public DeleteCustomMetricResponse deleteCustomMetric(DeleteCustomMetricRequest deleteCustomMetricRequest)
throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteCustomMetricResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCustomMetricRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCustomMetric");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCustomMetric").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteCustomMetricRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCustomMetricRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Removes the specified dimension from your Amazon Web Services accounts.
*
*
* Requires permission to access the DeleteDimension action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteDimension
*/
@Override
public DeleteDimensionResponse deleteDimension(DeleteDimensionRequest deleteDimensionRequest)
throws InternalFailureException, InvalidRequestException, ThrottlingException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteDimensionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDimensionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDimension");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteDimension").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteDimensionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDimensionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified domain configuration.
*
*
* Requires permission to access the DeleteDomainConfiguration action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteDomainConfiguration
*/
@Override
public DeleteDomainConfigurationResponse deleteDomainConfiguration(
DeleteDomainConfigurationRequest deleteDomainConfigurationRequest) throws ResourceNotFoundException,
ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException,
InvalidRequestException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteDomainConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDomainConfigurationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDomainConfiguration");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDomainConfiguration").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteDomainConfigurationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDomainConfigurationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a dynamic thing group.
*
*
* Requires permission to access the DeleteDynamicThingGroup action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteDynamicThingGroup
*/
@Override
public DeleteDynamicThingGroupResponse deleteDynamicThingGroup(DeleteDynamicThingGroupRequest deleteDynamicThingGroupRequest)
throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteDynamicThingGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDynamicThingGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDynamicThingGroup");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDynamicThingGroup").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteDynamicThingGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteDynamicThingGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @param deleteFleetMetricRequest
* @return Result of the DeleteFleetMetric 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 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 SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteFleetMetric
*/
@Override
public DeleteFleetMetricResponse deleteFleetMetric(DeleteFleetMetricRequest deleteFleetMetricRequest)
throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException,
InternalFailureException, VersionConflictException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteFleetMetricResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFleetMetricRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFleetMetric");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteFleetMetric").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteFleetMetricRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteFleetMetricRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteJob
*/
@Override
public DeleteJobResponse deleteJob(DeleteJobRequest deleteJobRequest) throws InvalidRequestException,
InvalidStateTransitionException, ResourceNotFoundException, LimitExceededException, ThrottlingException,
ServiceUnavailableException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteJobResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteJobRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteJob");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteJob").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteJobRequest)
.withMetricCollector(apiCallMetricCollector).withMarshaller(new DeleteJobRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a job execution.
*
*
* Requires permission to access the DeleteJobExecution action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteJobExecution
*/
@Override
public DeleteJobExecutionResponse deleteJobExecution(DeleteJobExecutionRequest deleteJobExecutionRequest)
throws InvalidRequestException, InvalidStateTransitionException, ResourceNotFoundException, ThrottlingException,
ServiceUnavailableException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteJobExecutionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteJobExecutionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteJobExecution");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteJobExecution").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteJobExecutionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteJobExecutionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified job template.
*
*
* @param deleteJobTemplateRequest
* @return Result of the DeleteJobTemplate 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteJobTemplate
*/
@Override
public DeleteJobTemplateResponse deleteJobTemplate(DeleteJobTemplateRequest deleteJobTemplateRequest)
throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException,
AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteJobTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteJobTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteJobTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteJobTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteJobTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteJobTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a defined mitigation action from your Amazon Web Services accounts.
*
*
* Requires permission to access the DeleteMitigationAction action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteMitigationAction
*/
@Override
public DeleteMitigationActionResponse deleteMitigationAction(DeleteMitigationActionRequest deleteMitigationActionRequest)
throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteMitigationActionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMitigationActionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMitigationAction");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteMitigationAction").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteMitigationActionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteMitigationActionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Delete an OTA update.
*
*
* Requires permission to access the DeleteOTAUpdate action.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteOTAUpdate
*/
@Override
public DeleteOtaUpdateResponse deleteOTAUpdate(DeleteOtaUpdateRequest deleteOtaUpdateRequest) throws InvalidRequestException,
ResourceNotFoundException, ThrottlingException, UnauthorizedException, InternalFailureException,
ServiceUnavailableException, VersionConflictException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteOtaUpdateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteOtaUpdateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteOTAUpdate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteOTAUpdate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteOtaUpdateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteOtaUpdateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeletePolicy
*/
@Override
public DeletePolicyResponse deletePolicy(DeletePolicyRequest deletePolicyRequest) throws DeleteConflictException,
ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException,
ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeletePolicyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePolicyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeletePolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deletePolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeletePolicyRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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.
*
*
* @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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeletePolicyVersion
*/
@Override
public DeletePolicyVersionResponse deletePolicyVersion(DeletePolicyVersionRequest deletePolicyVersionRequest)
throws DeleteConflictException, ResourceNotFoundException, InvalidRequestException, ThrottlingException,
UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException,
SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeletePolicyVersionResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePolicyVersionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePolicyVersion");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeletePolicyVersion").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deletePolicyVersionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeletePolicyVersionRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a provisioning template.
*
*
* Requires permission to access the DeleteProvisioningTemplate action.
*
*
* @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 ConflictingResourceUpdateException
* A conflicting resource update exception. This exception is thrown when two pending updates cause a
* conflict.
* @throws UnauthorizedException
* You are not authorized to perform this operation.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws IotException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample IotClient.DeleteProvisioningTemplate
*/
@Override
public DeleteProvisioningTemplateResponse deleteProvisioningTemplate(
DeleteProvisioningTemplateRequest deleteProvisioningTemplateRequest) throws InternalFailureException,
InvalidRequestException, ResourceNotFoundException, DeleteConflictException, ThrottlingException,
ConflictingResourceUpdateException, UnauthorizedException, AwsServiceException, SdkClientException, IotException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteProvisioningTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteProvisioningTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteProvisioningTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteProvisioningTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteProvisioningTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteProvisioningTemplateRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a provisioning template version.
*
*
* Requires permission to access the