All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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 DeleteProvisioningTemplateVersion action. *

* * @param deleteProvisioningTemplateVersionRequest * @return Result of the DeleteProvisioningTemplateVersion operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ConflictingResourceUpdateException * A conflicting resource update exception. This exception is thrown when two pending updates cause a * conflict. * @throws DeleteConflictException * You can't delete the resource because it is attached to one or more resources. * @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.DeleteProvisioningTemplateVersion */ @Override public DeleteProvisioningTemplateVersionResponse deleteProvisioningTemplateVersion( DeleteProvisioningTemplateVersionRequest deleteProvisioningTemplateVersionRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, ResourceNotFoundException, UnauthorizedException, ConflictingResourceUpdateException, DeleteConflictException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteProvisioningTemplateVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteProvisioningTemplateVersionRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteProvisioningTemplateVersion"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteProvisioningTemplateVersion").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteProvisioningTemplateVersionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteProvisioningTemplateVersionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a CA certificate registration code. *

*

* Requires permission to access the DeleteRegistrationCode action. *

* * @param deleteRegistrationCodeRequest * The input for the DeleteRegistrationCode operation. * @return Result of the DeleteRegistrationCode operation returned by the service. * @throws ThrottlingException * The rate exceeds the limit. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteRegistrationCode */ @Override public DeleteRegistrationCodeResponse deleteRegistrationCode(DeleteRegistrationCodeRequest deleteRegistrationCodeRequest) throws ThrottlingException, ResourceNotFoundException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteRegistrationCodeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRegistrationCodeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRegistrationCode"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRegistrationCode").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteRegistrationCodeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteRegistrationCodeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a role alias *

*

* Requires permission to access the DeleteRoleAlias action. *

* * @param deleteRoleAliasRequest * @return Result of the DeleteRoleAlias operation returned by the service. * @throws DeleteConflictException * You can't delete the resource because it is attached to one or more resources. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DeleteRoleAlias */ @Override public DeleteRoleAliasResponse deleteRoleAlias(DeleteRoleAliasRequest deleteRoleAliasRequest) throws DeleteConflictException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteRoleAliasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRoleAliasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRoleAlias"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteRoleAlias").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteRoleAliasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteRoleAliasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a scheduled audit. *

*

* Requires permission to access the DeleteScheduledAudit action. *

* * @param deleteScheduledAuditRequest * @return Result of the DeleteScheduledAudit operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteScheduledAudit */ @Override public DeleteScheduledAuditResponse deleteScheduledAudit(DeleteScheduledAuditRequest deleteScheduledAuditRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteScheduledAuditResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteScheduledAuditRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteScheduledAudit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteScheduledAudit").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteScheduledAuditRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteScheduledAuditRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a Device Defender security profile. *

*

* Requires permission to access the DeleteSecurityProfile action. *

* * @param deleteSecurityProfileRequest * @return Result of the DeleteSecurityProfile operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @throws VersionConflictException * An exception thrown when the version of an entity specified with the expectedVersion * parameter does not match the latest version in the system. * @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.DeleteSecurityProfile */ @Override public DeleteSecurityProfileResponse deleteSecurityProfile(DeleteSecurityProfileRequest deleteSecurityProfileRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, VersionConflictException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSecurityProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteSecurityProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteSecurityProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteSecurityProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a stream. *

*

* Requires permission to access the DeleteStream action. *

* * @param deleteStreamRequest * @return Result of the DeleteStream operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws DeleteConflictException * You can't delete the resource because it is attached to one or more resources. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteStream */ @Override public DeleteStreamResponse deleteStream(DeleteStreamRequest deleteStreamRequest) throws ResourceNotFoundException, DeleteConflictException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteStreamResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStreamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStream"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteStream").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStreamRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStreamRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified thing. Returns successfully with no error if the deletion is successful or you specify a * thing that doesn't exist. *

*

* Requires permission to access the DeleteThing action. *

* * @param deleteThingRequest * The input for the DeleteThing operation. * @return Result of the DeleteThing operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws VersionConflictException * An exception thrown when the version of an entity specified with the expectedVersion * parameter does not match the latest version in the system. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteThing */ @Override public DeleteThingResponse deleteThing(DeleteThingRequest deleteThingRequest) throws ResourceNotFoundException, VersionConflictException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteThing"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a thing group. *

*

* Requires permission to access the DeleteThingGroup action. *

* * @param deleteThingGroupRequest * @return Result of the DeleteThingGroup operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws VersionConflictException * An exception thrown when the version of an entity specified with the expectedVersion * parameter does not match the latest version in the system. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteThingGroup */ @Override public DeleteThingGroupResponse deleteThingGroup(DeleteThingGroupRequest deleteThingGroupRequest) throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteThingGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a * thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things * by calling UpdateThing to change the thing type on any associated thing, and finally use * DeleteThingType to delete the thing type. *

*

* Requires permission to access the DeleteThingType action. *

* * @param deleteThingTypeRequest * The input for the DeleteThingType operation. * @return Result of the DeleteThingType operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeleteThingType */ @Override public DeleteThingTypeResponse deleteThingType(DeleteThingTypeRequest deleteThingTypeRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteThingTypeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteThingTypeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteThingType"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteThingType").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteThingTypeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteThingTypeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the rule. *

*

* Requires permission to access the DeleteTopicRule action. *

* * @param deleteTopicRuleRequest * The input for the DeleteTopicRule operation. * @return Result of the DeleteTopicRule operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ConflictingResourceUpdateException * A conflicting resource update exception. This exception is thrown when two pending updates cause a * conflict. * @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.DeleteTopicRule */ @Override public DeleteTopicRuleResponse deleteTopicRule(DeleteTopicRuleRequest deleteTopicRuleRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteTopicRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTopicRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTopicRule"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteTopicRule").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteTopicRuleRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteTopicRuleRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a topic rule destination. *

*

* Requires permission to access the DeleteTopicRuleDestination action. *

* * @param deleteTopicRuleDestinationRequest * @return Result of the DeleteTopicRuleDestination operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ConflictingResourceUpdateException * A conflicting resource update exception. This exception is thrown when two pending updates cause a * conflict. * @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.DeleteTopicRuleDestination */ @Override public DeleteTopicRuleDestinationResponse deleteTopicRuleDestination( DeleteTopicRuleDestinationRequest deleteTopicRuleDestinationRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteTopicRuleDestinationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTopicRuleDestinationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTopicRuleDestination"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteTopicRuleDestination").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteTopicRuleDestinationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteTopicRuleDestinationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a logging level. *

*

* Requires permission to access the DeleteV2LoggingLevel action. *

* * @param deleteV2LoggingLevelRequest * @return Result of the DeleteV2LoggingLevel operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @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.DeleteV2LoggingLevel */ @Override public DeleteV2LoggingLevelResponse deleteV2LoggingLevel(DeleteV2LoggingLevelRequest deleteV2LoggingLevelRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteV2LoggingLevelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteV2LoggingLevelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteV2LoggingLevel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteV2LoggingLevel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteV2LoggingLevelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteV2LoggingLevelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deprecates a thing type. You can not associate new things with deprecated thing type. *

*

* Requires permission to access the DeprecateThingType action. *

* * @param deprecateThingTypeRequest * The input for the DeprecateThingType operation. * @return Result of the DeprecateThingType operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DeprecateThingType */ @Override public DeprecateThingTypeResponse deprecateThingType(DeprecateThingTypeRequest deprecateThingTypeRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeprecateThingTypeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deprecateThingTypeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeprecateThingType"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeprecateThingType").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deprecateThingTypeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeprecateThingTypeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the Device Defender audit settings for this account. Settings include how audit * notifications are sent and which audit checks are enabled or disabled. *

*

* Requires permission to access the DescribeAccountAuditConfiguration action. *

* * @param describeAccountAuditConfigurationRequest * @return Result of the DescribeAccountAuditConfiguration operation returned by the service. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAccountAuditConfiguration */ @Override public DescribeAccountAuditConfigurationResponse describeAccountAuditConfiguration( DescribeAccountAuditConfigurationRequest describeAccountAuditConfigurationRequest) throws ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAccountAuditConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountAuditConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccountAuditConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAccountAuditConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAccountAuditConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAccountAuditConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a single audit finding. Properties include the reason for noncompliance, the severity of * the issue, and the start time when the audit that returned the finding. *

*

* Requires permission to access the DescribeAuditFinding action. *

* * @param describeAuditFindingRequest * @return Result of the DescribeAuditFinding operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAuditFinding */ @Override public DescribeAuditFindingResponse describeAuditFinding(DescribeAuditFindingRequest describeAuditFindingRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAuditFindingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuditFindingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuditFinding"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeAuditFinding").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAuditFindingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAuditFindingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about an audit mitigation task that is used to apply mitigation actions to a set of audit * findings. Properties include the actions being applied, the audit checks to which they're being applied, the task * status, and aggregated task statistics. *

* * @param describeAuditMitigationActionsTaskRequest * @return Result of the DescribeAuditMitigationActionsTask operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAuditMitigationActionsTask */ @Override public DescribeAuditMitigationActionsTaskResponse describeAuditMitigationActionsTask( DescribeAuditMitigationActionsTaskRequest describeAuditMitigationActionsTaskRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAuditMitigationActionsTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuditMitigationActionsTaskRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuditMitigationActionsTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAuditMitigationActionsTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAuditMitigationActionsTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAuditMitigationActionsTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Device Defender audit suppression. *

* * @param describeAuditSuppressionRequest * @return Result of the DescribeAuditSuppression operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAuditSuppression */ @Override public DescribeAuditSuppressionResponse describeAuditSuppression( DescribeAuditSuppressionRequest describeAuditSuppressionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAuditSuppressionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuditSuppressionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuditSuppression"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAuditSuppression").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAuditSuppressionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAuditSuppressionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Device Defender audit. *

*

* Requires permission to access the DescribeAuditTask action. *

* * @param describeAuditTaskRequest * @return Result of the DescribeAuditTask operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAuditTask */ @Override public DescribeAuditTaskResponse describeAuditTask(DescribeAuditTaskRequest describeAuditTaskRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeAuditTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuditTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuditTask"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeAuditTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAuditTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAuditTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes an authorizer. *

*

* Requires permission to access the DescribeAuthorizer action. *

* * @param describeAuthorizerRequest * @return Result of the DescribeAuthorizer operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeAuthorizer */ @Override public DescribeAuthorizerResponse describeAuthorizer(DescribeAuthorizerRequest describeAuthorizerRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAuthorizerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuthorizerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuthorizer"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeAuthorizer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeAuthorizerRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeAuthorizerRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a billing group. *

*

* Requires permission to access the DescribeBillingGroup action. *

* * @param describeBillingGroupRequest * @return Result of the DescribeBillingGroup operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeBillingGroup */ @Override public DescribeBillingGroupResponse describeBillingGroup(DescribeBillingGroupRequest describeBillingGroupRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeBillingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeBillingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeBillingGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeBillingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeBillingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeBillingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a registered CA certificate. *

*

* Requires permission to access the DescribeCACertificate action. *

* * @param describeCaCertificateRequest * The input for the DescribeCACertificate operation. * @return Result of the DescribeCACertificate operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeCACertificate */ @Override public DescribeCaCertificateResponse describeCACertificate(DescribeCaCertificateRequest describeCaCertificateRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCaCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCaCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCACertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeCACertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeCaCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeCaCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified certificate. *

*

* Requires permission to access the DescribeCertificate action. *

* * @param describeCertificateRequest * The input for the DescribeCertificate operation. * @return Result of the DescribeCertificate operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeCertificate */ @Override public DescribeCertificateResponse describeCertificate(DescribeCertificateRequest describeCertificateRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeCertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Device Defender detect custom metric. *

*

* Requires permission to access the DescribeCustomMetric action. *

* * @param describeCustomMetricRequest * @return Result of the DescribeCustomMetric 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.DescribeCustomMetric */ @Override public DescribeCustomMetricResponse describeCustomMetric(DescribeCustomMetricRequest describeCustomMetricRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCustomMetricResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCustomMetricRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCustomMetric"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeCustomMetric").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeCustomMetricRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeCustomMetricRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes the default authorizer. *

*

* Requires permission to access the DescribeDefaultAuthorizer action. *

* * @param describeDefaultAuthorizerRequest * @return Result of the DescribeDefaultAuthorizer operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeDefaultAuthorizer */ @Override public DescribeDefaultAuthorizerResponse describeDefaultAuthorizer( DescribeDefaultAuthorizerRequest describeDefaultAuthorizerRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeDefaultAuthorizerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDefaultAuthorizerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDefaultAuthorizer"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDefaultAuthorizer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDefaultAuthorizerRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDefaultAuthorizerRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Device Defender ML Detect mitigation action. *

*

* Requires permission to access the DescribeDetectMitigationActionsTask action. *

* * @param describeDetectMitigationActionsTaskRequest * @return Result of the DescribeDetectMitigationActionsTask 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.DescribeDetectMitigationActionsTask */ @Override public DescribeDetectMitigationActionsTaskResponse describeDetectMitigationActionsTask( DescribeDetectMitigationActionsTaskRequest describeDetectMitigationActionsTaskRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeDetectMitigationActionsTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDetectMitigationActionsTaskRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDetectMitigationActionsTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDetectMitigationActionsTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDetectMitigationActionsTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDetectMitigationActionsTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides details about a dimension that is defined in your Amazon Web Services accounts. *

*

* Requires permission to access the DescribeDimension action. *

* * @param describeDimensionRequest * @return Result of the DescribeDimension operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @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.DescribeDimension */ @Override public DescribeDimensionResponse describeDimension(DescribeDimensionRequest describeDimensionRequest) throws InternalFailureException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeDimensionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDimensionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDimension"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDimension").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDimensionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDimensionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets summary information about a domain configuration. *

*

* Requires permission to access the DescribeDomainConfiguration action. *

* * @param describeDomainConfigurationRequest * @return Result of the DescribeDomainConfiguration operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @throws InvalidRequestException * The request is not valid. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @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.DescribeDomainConfiguration */ @Override public DescribeDomainConfigurationResponse describeDomainConfiguration( DescribeDomainConfigurationRequest describeDomainConfigurationRequest) throws ResourceNotFoundException, ThrottlingException, InvalidRequestException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeDomainConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDomainConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDomainConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDomainConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDomainConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDomainConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a unique endpoint specific to the Amazon Web Services account making the call. *

*

* Requires permission to access the DescribeEndpoint action. *

* * @param describeEndpointRequest * The input for the DescribeEndpoint operation. * @return Result of the DescribeEndpoint operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ThrottlingException * The rate exceeds the limit. * @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.DescribeEndpoint */ @Override public DescribeEndpointResponse describeEndpoint(DescribeEndpointRequest describeEndpointRequest) throws InternalFailureException, InvalidRequestException, UnauthorizedException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpoint"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeEndpoint").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes event configurations. *

*

* Requires permission to access the DescribeEventConfigurations action. *

* * @param describeEventConfigurationsRequest * @return Result of the DescribeEventConfigurations operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws ThrottlingException * The rate exceeds the limit. * @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.DescribeEventConfigurations */ @Override public DescribeEventConfigurationsResponse describeEventConfigurations( DescribeEventConfigurationsRequest describeEventConfigurationsRequest) throws InternalFailureException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventConfigurationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventConfigurationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventConfigurations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventConfigurations").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEventConfigurationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventConfigurationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified fleet metric. *

*

* Requires permission to access the DescribeFleetMetric action. *

* * @param describeFleetMetricRequest * @return Result of the DescribeFleetMetric operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeFleetMetric */ @Override public DescribeFleetMetricResponse describeFleetMetric(DescribeFleetMetricRequest describeFleetMetricRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetMetricResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetMetricRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetMetric"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeFleetMetric").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeFleetMetricRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeFleetMetricRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a search index. *

*

* Requires permission to access the DescribeIndex action. *

* * @param describeIndexRequest * @return Result of the DescribeIndex operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeIndex */ @Override public DescribeIndexResponse describeIndex(DescribeIndexRequest describeIndexRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeIndexResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeIndexRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeIndex"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeIndex").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeIndexRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeIndexRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a job. *

*

* Requires permission to access the DescribeJob action. *

* * @param describeJobRequest * @return Result of the DescribeJob 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 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.DescribeJob */ @Override public DescribeJobResponse describeJob(DescribeJobRequest describeJobRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeJob"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeJob").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a job execution. *

*

* Requires permission to access the DescribeJobExecution action. *

* * @param describeJobExecutionRequest * @return Result of the DescribeJobExecution 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 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.DescribeJobExecution */ @Override public DescribeJobExecutionResponse describeJobExecution(DescribeJobExecutionRequest describeJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeJobExecutionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeJobExecutionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeJobExecution"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeJobExecution").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeJobExecutionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeJobExecutionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a job template. *

* * @param describeJobTemplateRequest * @return Result of the DescribeJobTemplate 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.DescribeJobTemplate */ @Override public DescribeJobTemplateResponse describeJobTemplate(DescribeJobTemplateRequest describeJobTemplateRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeJobTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeJobTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeJobTemplate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeJobTemplate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeJobTemplateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeJobTemplateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* View details of a managed job template. *

* * @param describeManagedJobTemplateRequest * @return Result of the DescribeManagedJobTemplate 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 InternalServerException * Internal error from the service that indicates an unexpected error or that the service is 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.DescribeManagedJobTemplate */ @Override public DescribeManagedJobTemplateResponse describeManagedJobTemplate( DescribeManagedJobTemplateRequest describeManagedJobTemplateRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeManagedJobTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeManagedJobTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeManagedJobTemplate"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeManagedJobTemplate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeManagedJobTemplateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeManagedJobTemplateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a mitigation action. *

*

* Requires permission to access the DescribeMitigationAction action. *

* * @param describeMitigationActionRequest * @return Result of the DescribeMitigationAction 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.DescribeMitigationAction */ @Override public DescribeMitigationActionResponse describeMitigationAction( DescribeMitigationActionRequest describeMitigationActionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeMitigationActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeMitigationActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeMitigationAction"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeMitigationAction").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeMitigationActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeMitigationActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a provisioning template. *

*

* Requires permission to access the DescribeProvisioningTemplate action. *

* * @param describeProvisioningTemplateRequest * @return Result of the DescribeProvisioningTemplate operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @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.DescribeProvisioningTemplate */ @Override public DescribeProvisioningTemplateResponse describeProvisioningTemplate( DescribeProvisioningTemplateRequest describeProvisioningTemplateRequest) throws InternalFailureException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeProvisioningTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeProvisioningTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeProvisioningTemplate"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeProvisioningTemplate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeProvisioningTemplateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeProvisioningTemplateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a provisioning template version. *

*

* Requires permission to access the DescribeProvisioningTemplateVersion action. *

* * @param describeProvisioningTemplateVersionRequest * @return Result of the DescribeProvisioningTemplateVersion operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws 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.DescribeProvisioningTemplateVersion */ @Override public DescribeProvisioningTemplateVersionResponse describeProvisioningTemplateVersion( DescribeProvisioningTemplateVersionRequest describeProvisioningTemplateVersionRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, ResourceNotFoundException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeProvisioningTemplateVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeProvisioningTemplateVersionRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeProvisioningTemplateVersion"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeProvisioningTemplateVersion").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeProvisioningTemplateVersionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeProvisioningTemplateVersionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a role alias. *

*

* Requires permission to access the DescribeRoleAlias action. *

* * @param describeRoleAliasRequest * @return Result of the DescribeRoleAlias operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.DescribeRoleAlias */ @Override public DescribeRoleAliasResponse describeRoleAlias(DescribeRoleAliasRequest describeRoleAliasRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeRoleAliasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRoleAliasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRoleAlias"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeRoleAlias").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeRoleAliasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeRoleAliasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a scheduled audit. *

*

* Requires permission to access the DescribeScheduledAudit action. *

* * @param describeScheduledAuditRequest * @return Result of the DescribeScheduledAudit 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.DescribeScheduledAudit */ @Override public DescribeScheduledAuditResponse describeScheduledAudit(DescribeScheduledAuditRequest describeScheduledAuditRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeScheduledAuditResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeScheduledAuditRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeScheduledAudit"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeScheduledAudit").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeScheduledAuditRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeScheduledAuditRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Device Defender security profile. *

*

* Requires permission to access the DescribeSecurityProfile action. *

* * @param describeSecurityProfileRequest * @return Result of the DescribeSecurityProfile 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.DescribeSecurityProfile */ @Override public DescribeSecurityProfileResponse describeSecurityProfile(DescribeSecurityProfileRequest describeSecurityProfileRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeSecurityProfile"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeSecurityProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeSecurityProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeSecurityProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a stream. *

*

* Requires permission to access the DescribeStream action. *

* * @param describeStreamRequest * @return Result of the DescribeStream 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.DescribeStream */ @Override public DescribeStreamResponse describeStream(DescribeStreamRequest describeStreamRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeStreamResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeStreamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeStream"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeStream").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeStreamRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeStreamRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified thing. *

*

* Requires permission to access the DescribeThing action. *

* * @param describeThingRequest * The input for the DescribeThing operation. * @return Result of the DescribeThing 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.DescribeThing */ @Override public DescribeThingResponse describeThing(DescribeThingRequest describeThingRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeThing"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describe a thing group. *

*

* Requires permission to access the DescribeThingGroup action. *

* * @param describeThingGroupRequest * @return Result of the DescribeThingGroup 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.DescribeThingGroup */ @Override public DescribeThingGroupResponse describeThingGroup(DescribeThingGroupRequest describeThingGroupRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeThingGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Describes a bulk thing provisioning task. *

*

* Requires permission to access the DescribeThingRegistrationTask action. *

* * @param describeThingRegistrationTaskRequest * @return Result of the DescribeThingRegistrationTask 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 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.DescribeThingRegistrationTask */ @Override public DescribeThingRegistrationTaskResponse describeThingRegistrationTask( DescribeThingRegistrationTaskRequest describeThingRegistrationTaskRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeThingRegistrationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeThingRegistrationTaskRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeThingRegistrationTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeThingRegistrationTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeThingRegistrationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeThingRegistrationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified thing type. *

*

* Requires permission to access the DescribeThingType action. *

* * @param describeThingTypeRequest * The input for the DescribeThingType operation. * @return Result of the DescribeThingType 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.DescribeThingType */ @Override public DescribeThingTypeResponse describeThingType(DescribeThingTypeRequest describeThingTypeRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeThingTypeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeThingTypeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeThingType"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeThingType").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeThingTypeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeThingTypeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Detaches a policy from the specified target. *

* *

* 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 DetachPolicy action. *

* * @param detachPolicyRequest * @return Result of the DetachPolicy 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 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.DetachPolicy */ @Override public DetachPolicyResponse detachPolicy(DetachPolicyRequest detachPolicyRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DetachPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachPolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DetachPolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(detachPolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DetachPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Disassociates a Device Defender security profile from a thing group or from this account. *

*

* Requires permission to access the DetachSecurityProfile action. *

* * @param detachSecurityProfileRequest * @return Result of the DetachSecurityProfile 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.DetachSecurityProfile */ @Override public DetachSecurityProfileResponse detachSecurityProfile(DetachSecurityProfileRequest detachSecurityProfileRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DetachSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachSecurityProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DetachSecurityProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(detachSecurityProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DetachSecurityProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Detaches the specified principal from the specified thing. A principal can be X.509 certificates, IAM users, * groups, and roles, Amazon Cognito identities or federated identities. *

* *

* This call is asynchronous. It might take several seconds for the detachment to propagate. *

*
*

* Requires permission to access the DetachThingPrincipal action. *

* * @param detachThingPrincipalRequest * The input for the DetachThingPrincipal operation. * @return Result of the DetachThingPrincipal 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.DetachThingPrincipal */ @Override public DetachThingPrincipalResponse detachThingPrincipal(DetachThingPrincipalRequest detachThingPrincipalRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DetachThingPrincipalResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, detachThingPrincipalRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DetachThingPrincipal"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DetachThingPrincipal").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(detachThingPrincipalRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DetachThingPrincipalRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Disables the rule. *

*

* Requires permission to access the DisableTopicRule action. *

* * @param disableTopicRuleRequest * The input for the DisableTopicRuleRequest operation. * @return Result of the DisableTopicRule 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.DisableTopicRule */ @Override public DisableTopicRuleResponse disableTopicRule(DisableTopicRuleRequest disableTopicRuleRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DisableTopicRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, disableTopicRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableTopicRule"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DisableTopicRule").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(disableTopicRuleRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DisableTopicRuleRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Enables the rule. *

*

* Requires permission to access the EnableTopicRule action. *

* * @param enableTopicRuleRequest * The input for the EnableTopicRuleRequest operation. * @return Result of the EnableTopicRule 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.EnableTopicRule */ @Override public EnableTopicRuleResponse enableTopicRule(EnableTopicRuleRequest enableTopicRuleRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, EnableTopicRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableTopicRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableTopicRule"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("EnableTopicRule").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(enableTopicRuleRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new EnableTopicRuleRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a Device Defender's ML Detect Security Profile training model's status. *

*

* Requires permission to access the GetBehaviorModelTrainingSummaries action. *

* * @param getBehaviorModelTrainingSummariesRequest * @return Result of the GetBehaviorModelTrainingSummaries 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.GetBehaviorModelTrainingSummaries */ @Override public GetBehaviorModelTrainingSummariesResponse getBehaviorModelTrainingSummaries( GetBehaviorModelTrainingSummariesRequest getBehaviorModelTrainingSummariesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetBehaviorModelTrainingSummariesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBehaviorModelTrainingSummariesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBehaviorModelTrainingSummaries"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetBehaviorModelTrainingSummaries").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBehaviorModelTrainingSummariesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetBehaviorModelTrainingSummariesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a Device Defender's ML Detect Security Profile training model's status. *

*

* Requires permission to access the GetBehaviorModelTrainingSummaries action. *

*
*

* This is a variant of * {@link #getBehaviorModelTrainingSummaries(software.amazon.awssdk.services.iot.model.GetBehaviorModelTrainingSummariesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.GetBehaviorModelTrainingSummariesIterable responses = client.getBehaviorModelTrainingSummariesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.GetBehaviorModelTrainingSummariesIterable responses = client
     *             .getBehaviorModelTrainingSummariesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.GetBehaviorModelTrainingSummariesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.GetBehaviorModelTrainingSummariesIterable responses = client.getBehaviorModelTrainingSummariesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #getBehaviorModelTrainingSummaries(software.amazon.awssdk.services.iot.model.GetBehaviorModelTrainingSummariesRequest)} * operation. *

* * @param getBehaviorModelTrainingSummariesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.GetBehaviorModelTrainingSummaries */ @Override public GetBehaviorModelTrainingSummariesIterable getBehaviorModelTrainingSummariesPaginator( GetBehaviorModelTrainingSummariesRequest getBehaviorModelTrainingSummariesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new GetBehaviorModelTrainingSummariesIterable(this, applyPaginatorUserAgent(getBehaviorModelTrainingSummariesRequest)); } /** *

* Aggregates on indexed data with search queries pertaining to particular fields. *

*

* Requires permission to access the GetBucketsAggregation action. *

* * @param getBucketsAggregationRequest * @return Result of the GetBucketsAggregation operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.GetBucketsAggregation */ @Override public GetBucketsAggregationResponse getBucketsAggregation(GetBucketsAggregationRequest getBucketsAggregationRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, InvalidAggregationException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetBucketsAggregationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getBucketsAggregationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetBucketsAggregation"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetBucketsAggregation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getBucketsAggregationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetBucketsAggregationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns the approximate count of unique values that match the query. *

*

* Requires permission to access the GetCardinality action. *

* * @param getCardinalityRequest * @return Result of the GetCardinality operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.GetCardinality */ @Override public GetCardinalityResponse getCardinality(GetCardinalityRequest getCardinalityRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, InvalidAggregationException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetCardinalityResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCardinalityRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCardinality"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetCardinality").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getCardinalityRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetCardinalityRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of the policies that have an effect on the authorization behavior of the specified device when it * connects to the IoT device gateway. *

*

* Requires permission to access the GetEffectivePolicies action. *

* * @param getEffectivePoliciesRequest * @return Result of the GetEffectivePolicies 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.GetEffectivePolicies */ @Override public GetEffectivePoliciesResponse getEffectivePolicies(GetEffectivePoliciesRequest getEffectivePoliciesRequest) 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, GetEffectivePoliciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getEffectivePoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEffectivePolicies"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetEffectivePolicies").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getEffectivePoliciesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetEffectivePoliciesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets the indexing configuration. *

*

* Requires permission to access the GetIndexingConfiguration action. *

* * @param getIndexingConfigurationRequest * @return Result of the GetIndexingConfiguration 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.GetIndexingConfiguration */ @Override public GetIndexingConfigurationResponse getIndexingConfiguration( GetIndexingConfigurationRequest getIndexingConfigurationRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetIndexingConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getIndexingConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIndexingConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetIndexingConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getIndexingConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetIndexingConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a job document. *

*

* Requires permission to access the GetJobDocument action. *

* * @param getJobDocumentRequest * @return Result of the GetJobDocument 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 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.GetJobDocument */ @Override public GetJobDocumentResponse getJobDocument(GetJobDocumentRequest getJobDocumentRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetJobDocumentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getJobDocumentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetJobDocument"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetJobDocument").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getJobDocumentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetJobDocumentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets the logging options. *

*

* NOTE: use of this command is not recommended. Use GetV2LoggingOptions instead. *

*

* Requires permission to access the GetLoggingOptions action. *

* * @param getLoggingOptionsRequest * The input for the GetLoggingOptions operation. * @return Result of the GetLoggingOptions 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 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.GetLoggingOptions */ @Override public GetLoggingOptionsResponse getLoggingOptions(GetLoggingOptionsRequest getLoggingOptionsRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLoggingOptions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetLoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getLoggingOptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetLoggingOptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets an OTA update. *

*

* Requires permission to access the GetOTAUpdate action. *

* * @param getOtaUpdateRequest * @return Result of the GetOTAUpdate 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 InternalFailureException * An unexpected error has occurred. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @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.GetOTAUpdate */ @Override public GetOtaUpdateResponse getOTAUpdate(GetOtaUpdateRequest getOtaUpdateRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, ServiceUnavailableException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetOtaUpdateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getOtaUpdateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOTAUpdate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetOTAUpdate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getOtaUpdateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetOtaUpdateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Groups the aggregated values that match the query into percentile groupings. The default percentile groupings * are: 1,5,25,50,75,95,99, although you can specify your own when you call GetPercentiles. This * function returns a value for each percentile group specified (or the default percentile groupings). The * percentile group "1" contains the aggregated field value that occurs in approximately one percent of the values * that match the query. The percentile group "5" contains the aggregated field value that occurs in approximately * five percent of the values that match the query, and so on. The result is an approximation, the more values that * match the query, the more accurate the percentile values. *

*

* Requires permission to access the GetPercentiles action. *

* * @param getPercentilesRequest * @return Result of the GetPercentiles operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.GetPercentiles */ @Override public GetPercentilesResponse getPercentiles(GetPercentilesRequest getPercentilesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, InvalidAggregationException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetPercentilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPercentilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPercentiles"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetPercentiles").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getPercentilesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetPercentilesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified policy with the policy document of the default version. *

*

* Requires permission to access the GetPolicy action. *

* * @param getPolicyRequest * The input for the GetPolicy operation. * @return Result of the GetPolicy 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.GetPolicy */ @Override public GetPolicyResponse getPolicy(GetPolicyRequest getPolicyRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetPolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getPolicyRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new GetPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the specified policy version. *

*

* Requires permission to access the GetPolicyVersion action. *

* * @param getPolicyVersionRequest * The input for the GetPolicyVersion operation. * @return Result of the GetPolicyVersion 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.GetPolicyVersion */ @Override public GetPolicyVersionResponse getPolicyVersion(GetPolicyVersionRequest getPolicyVersionRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetPolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getPolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPolicyVersion"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetPolicyVersion").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getPolicyVersionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetPolicyVersionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a registration code used to register a CA certificate with IoT. *

*

* Requires permission to access the GetRegistrationCode action. *

* * @param getRegistrationCodeRequest * The input to the GetRegistrationCode operation. * @return Result of the GetRegistrationCode operation returned by the service. * @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.GetRegistrationCode */ @Override public GetRegistrationCodeResponse getRegistrationCode(GetRegistrationCodeRequest getRegistrationCodeRequest) throws ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, InvalidRequestException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetRegistrationCodeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRegistrationCodeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRegistrationCode"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetRegistrationCode").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getRegistrationCodeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetRegistrationCodeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the * specified aggregated field. If the aggregation field is of type String, only the count statistic is * returned. *

*

* Requires permission to access the GetStatistics action. *

* * @param getStatisticsRequest * @return Result of the GetStatistics operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.GetStatistics */ @Override public GetStatisticsResponse getStatistics(GetStatisticsRequest getStatisticsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, InvalidAggregationException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetStatisticsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStatisticsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStatistics"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStatistics").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStatisticsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStatisticsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about the rule. *

*

* Requires permission to access the GetTopicRule action. *

* * @param getTopicRuleRequest * The input for the GetTopicRule operation. * @return Result of the GetTopicRule 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 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.GetTopicRule */ @Override public GetTopicRuleResponse getTopicRule(GetTopicRuleRequest getTopicRuleRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetTopicRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTopicRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTopicRule"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetTopicRule").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getTopicRuleRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTopicRuleRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a topic rule destination. *

*

* Requires permission to access the GetTopicRuleDestination action. *

* * @param getTopicRuleDestinationRequest * @return Result of the GetTopicRuleDestination 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 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.GetTopicRuleDestination */ @Override public GetTopicRuleDestinationResponse getTopicRuleDestination(GetTopicRuleDestinationRequest getTopicRuleDestinationRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTopicRuleDestinationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTopicRuleDestinationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTopicRuleDestination"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetTopicRuleDestination").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getTopicRuleDestinationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTopicRuleDestinationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets the fine grained logging options. *

*

* Requires permission to access the GetV2LoggingOptions action. *

* * @param getV2LoggingOptionsRequest * @return Result of the GetV2LoggingOptions operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws NotConfiguredException * The resource is not configured. * @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.GetV2LoggingOptions */ @Override public GetV2LoggingOptionsResponse getV2LoggingOptions(GetV2LoggingOptionsRequest getV2LoggingOptionsRequest) throws InternalException, NotConfiguredException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetV2LoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getV2LoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetV2LoggingOptions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetV2LoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getV2LoggingOptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetV2LoggingOptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the active violations for a given Device Defender security profile. *

*

* Requires permission to access the ListActiveViolations action. *

* * @param listActiveViolationsRequest * @return Result of the ListActiveViolations 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.ListActiveViolations */ @Override public ListActiveViolationsResponse listActiveViolations(ListActiveViolationsRequest listActiveViolationsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListActiveViolationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listActiveViolationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListActiveViolations"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListActiveViolations").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listActiveViolationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListActiveViolationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the active violations for a given Device Defender security profile. *

*

* Requires permission to access the ListActiveViolations action. *

*
*

* This is a variant of * {@link #listActiveViolations(software.amazon.awssdk.services.iot.model.ListActiveViolationsRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListActiveViolationsIterable responses = client.listActiveViolationsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListActiveViolationsIterable responses = client
     *             .listActiveViolationsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListActiveViolationsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListActiveViolationsIterable responses = client.listActiveViolationsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listActiveViolations(software.amazon.awssdk.services.iot.model.ListActiveViolationsRequest)} * operation. *

* * @param listActiveViolationsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListActiveViolations */ @Override public ListActiveViolationsIterable listActiveViolationsPaginator(ListActiveViolationsRequest listActiveViolationsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListActiveViolationsIterable(this, applyPaginatorUserAgent(listActiveViolationsRequest)); } /** *

* Lists the policies attached to the specified thing group. *

*

* Requires permission to access the ListAttachedPolicies action. *

* * @param listAttachedPoliciesRequest * @return Result of the ListAttachedPolicies 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.ListAttachedPolicies */ @Override public ListAttachedPoliciesResponse listAttachedPolicies(ListAttachedPoliciesRequest listAttachedPoliciesRequest) 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, ListAttachedPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAttachedPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAttachedPolicies"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAttachedPolicies").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAttachedPoliciesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAttachedPoliciesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the policies attached to the specified thing group. *

*

* Requires permission to access the ListAttachedPolicies action. *

*
*

* This is a variant of * {@link #listAttachedPolicies(software.amazon.awssdk.services.iot.model.ListAttachedPoliciesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAttachedPoliciesIterable responses = client.listAttachedPoliciesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAttachedPoliciesIterable responses = client
     *             .listAttachedPoliciesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAttachedPoliciesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAttachedPoliciesIterable responses = client.listAttachedPoliciesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAttachedPolicies(software.amazon.awssdk.services.iot.model.ListAttachedPoliciesRequest)} * operation. *

* * @param listAttachedPoliciesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAttachedPolicies */ @Override public ListAttachedPoliciesIterable listAttachedPoliciesPaginator(ListAttachedPoliciesRequest listAttachedPoliciesRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException { return new ListAttachedPoliciesIterable(this, applyPaginatorUserAgent(listAttachedPoliciesRequest)); } /** *

* Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time * period. (Findings are retained for 90 days.) *

*

* Requires permission to access the ListAuditFindings action. *

* * @param listAuditFindingsRequest * @return Result of the ListAuditFindings 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.ListAuditFindings */ @Override public ListAuditFindingsResponse listAuditFindings(ListAuditFindingsRequest listAuditFindingsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListAuditFindingsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuditFindingsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuditFindings"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAuditFindings").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAuditFindingsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuditFindingsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the findings (results) of a Device Defender audit or of the audits performed during a specified time * period. (Findings are retained for 90 days.) *

*

* Requires permission to access the ListAuditFindings action. *

*
*

* This is a variant of * {@link #listAuditFindings(software.amazon.awssdk.services.iot.model.ListAuditFindingsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditFindingsIterable responses = client.listAuditFindingsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuditFindingsIterable responses = client
     *             .listAuditFindingsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuditFindingsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditFindingsIterable responses = client.listAuditFindingsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuditFindings(software.amazon.awssdk.services.iot.model.ListAuditFindingsRequest)} operation. *

* * @param listAuditFindingsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuditFindings */ @Override public ListAuditFindingsIterable listAuditFindingsPaginator(ListAuditFindingsRequest listAuditFindingsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuditFindingsIterable(this, applyPaginatorUserAgent(listAuditFindingsRequest)); } /** *

* Gets the status of audit mitigation action tasks that were executed. *

*

* Requires permission to access the ListAuditMitigationActionsExecutions action. *

* * @param listAuditMitigationActionsExecutionsRequest * @return Result of the ListAuditMitigationActionsExecutions 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.ListAuditMitigationActionsExecutions */ @Override public ListAuditMitigationActionsExecutionsResponse listAuditMitigationActionsExecutions( ListAuditMitigationActionsExecutionsRequest listAuditMitigationActionsExecutionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListAuditMitigationActionsExecutionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuditMitigationActionsExecutionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuditMitigationActionsExecutions"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAuditMitigationActionsExecutions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withInput(listAuditMitigationActionsExecutionsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuditMitigationActionsExecutionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets the status of audit mitigation action tasks that were executed. *

*

* Requires permission to access the ListAuditMitigationActionsExecutions action. *

*
*

* This is a variant of * {@link #listAuditMitigationActionsExecutions(software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsExecutionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsExecutionsIterable responses = client.listAuditMitigationActionsExecutionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsExecutionsIterable responses = client
     *             .listAuditMitigationActionsExecutionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsExecutionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsExecutionsIterable responses = client.listAuditMitigationActionsExecutionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuditMitigationActionsExecutions(software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsExecutionsRequest)} * operation. *

* * @param listAuditMitigationActionsExecutionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuditMitigationActionsExecutions */ @Override public ListAuditMitigationActionsExecutionsIterable listAuditMitigationActionsExecutionsPaginator( ListAuditMitigationActionsExecutionsRequest listAuditMitigationActionsExecutionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuditMitigationActionsExecutionsIterable(this, applyPaginatorUserAgent(listAuditMitigationActionsExecutionsRequest)); } /** *

* Gets a list of audit mitigation action tasks that match the specified filters. *

*

* Requires permission to access the ListAuditMitigationActionsTasks action. *

* * @param listAuditMitigationActionsTasksRequest * @return Result of the ListAuditMitigationActionsTasks 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.ListAuditMitigationActionsTasks */ @Override public ListAuditMitigationActionsTasksResponse listAuditMitigationActionsTasks( ListAuditMitigationActionsTasksRequest listAuditMitigationActionsTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAuditMitigationActionsTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuditMitigationActionsTasksRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuditMitigationActionsTasks"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAuditMitigationActionsTasks").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAuditMitigationActionsTasksRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuditMitigationActionsTasksRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of audit mitigation action tasks that match the specified filters. *

*

* Requires permission to access the ListAuditMitigationActionsTasks action. *

*
*

* This is a variant of * {@link #listAuditMitigationActionsTasks(software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsTasksRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsTasksIterable responses = client.listAuditMitigationActionsTasksPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsTasksIterable responses = client
     *             .listAuditMitigationActionsTasksPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsTasksResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditMitigationActionsTasksIterable responses = client.listAuditMitigationActionsTasksPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuditMitigationActionsTasks(software.amazon.awssdk.services.iot.model.ListAuditMitigationActionsTasksRequest)} * operation. *

* * @param listAuditMitigationActionsTasksRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuditMitigationActionsTasks */ @Override public ListAuditMitigationActionsTasksIterable listAuditMitigationActionsTasksPaginator( ListAuditMitigationActionsTasksRequest listAuditMitigationActionsTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuditMitigationActionsTasksIterable(this, applyPaginatorUserAgent(listAuditMitigationActionsTasksRequest)); } /** *

* Lists your Device Defender audit listings. *

*

* Requires permission to access the ListAuditSuppressions action. *

* * @param listAuditSuppressionsRequest * @return Result of the ListAuditSuppressions 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.ListAuditSuppressions */ @Override public ListAuditSuppressionsResponse listAuditSuppressions(ListAuditSuppressionsRequest listAuditSuppressionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAuditSuppressionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuditSuppressionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuditSuppressions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAuditSuppressions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAuditSuppressionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuditSuppressionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists your Device Defender audit listings. *

*

* Requires permission to access the ListAuditSuppressions action. *

*
*

* This is a variant of * {@link #listAuditSuppressions(software.amazon.awssdk.services.iot.model.ListAuditSuppressionsRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditSuppressionsIterable responses = client.listAuditSuppressionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuditSuppressionsIterable responses = client
     *             .listAuditSuppressionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuditSuppressionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditSuppressionsIterable responses = client.listAuditSuppressionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuditSuppressions(software.amazon.awssdk.services.iot.model.ListAuditSuppressionsRequest)} * operation. *

* * @param listAuditSuppressionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuditSuppressions */ @Override public ListAuditSuppressionsIterable listAuditSuppressionsPaginator(ListAuditSuppressionsRequest listAuditSuppressionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuditSuppressionsIterable(this, applyPaginatorUserAgent(listAuditSuppressionsRequest)); } /** *

* Lists the Device Defender audits that have been performed during a given time period. *

*

* Requires permission to access the ListAuditTasks action. *

* * @param listAuditTasksRequest * @return Result of the ListAuditTasks 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.ListAuditTasks */ @Override public ListAuditTasksResponse listAuditTasks(ListAuditTasksRequest listAuditTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListAuditTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuditTasksRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuditTasks"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAuditTasks").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAuditTasksRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuditTasksRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the Device Defender audits that have been performed during a given time period. *

*

* Requires permission to access the ListAuditTasks action. *

*
*

* This is a variant of {@link #listAuditTasks(software.amazon.awssdk.services.iot.model.ListAuditTasksRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditTasksIterable responses = client.listAuditTasksPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuditTasksIterable responses = client.listAuditTasksPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuditTasksResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuditTasksIterable responses = client.listAuditTasksPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuditTasks(software.amazon.awssdk.services.iot.model.ListAuditTasksRequest)} operation. *

* * @param listAuditTasksRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuditTasks */ @Override public ListAuditTasksIterable listAuditTasksPaginator(ListAuditTasksRequest listAuditTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuditTasksIterable(this, applyPaginatorUserAgent(listAuditTasksRequest)); } /** *

* Lists the authorizers registered in your account. *

*

* Requires permission to access the ListAuthorizers action. *

* * @param listAuthorizersRequest * @return Result of the ListAuthorizers 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.ListAuthorizers */ @Override public ListAuthorizersResponse listAuthorizers(ListAuthorizersRequest listAuthorizersRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListAuthorizersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAuthorizersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAuthorizers"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAuthorizers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listAuthorizersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAuthorizersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the authorizers registered in your account. *

*

* Requires permission to access the ListAuthorizers action. *

*
*

* This is a variant of {@link #listAuthorizers(software.amazon.awssdk.services.iot.model.ListAuthorizersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuthorizersIterable responses = client.listAuthorizersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListAuthorizersIterable responses = client.listAuthorizersPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListAuthorizersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListAuthorizersIterable responses = client.listAuthorizersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listAuthorizers(software.amazon.awssdk.services.iot.model.ListAuthorizersRequest)} operation. *

* * @param listAuthorizersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListAuthorizers */ @Override public ListAuthorizersIterable listAuthorizersPaginator(ListAuthorizersRequest listAuthorizersRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListAuthorizersIterable(this, applyPaginatorUserAgent(listAuthorizersRequest)); } /** *

* Lists the billing groups you have created. *

*

* Requires permission to access the ListBillingGroups action. *

* * @param listBillingGroupsRequest * @return Result of the ListBillingGroups operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListBillingGroups */ @Override public ListBillingGroupsResponse listBillingGroups(ListBillingGroupsRequest listBillingGroupsRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListBillingGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listBillingGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListBillingGroups"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListBillingGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listBillingGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListBillingGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the billing groups you have created. *

*

* Requires permission to access the ListBillingGroups action. *

*
*

* This is a variant of * {@link #listBillingGroups(software.amazon.awssdk.services.iot.model.ListBillingGroupsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListBillingGroupsIterable responses = client.listBillingGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListBillingGroupsIterable responses = client
     *             .listBillingGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListBillingGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListBillingGroupsIterable responses = client.listBillingGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listBillingGroups(software.amazon.awssdk.services.iot.model.ListBillingGroupsRequest)} operation. *

* * @param listBillingGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListBillingGroups */ @Override public ListBillingGroupsIterable listBillingGroupsPaginator(ListBillingGroupsRequest listBillingGroupsRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListBillingGroupsIterable(this, applyPaginatorUserAgent(listBillingGroupsRequest)); } /** *

* Lists the CA certificates registered for your Amazon Web Services account. *

*

* The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional * results. *

*

* Requires permission to access the ListCACertificates action. *

* * @param listCaCertificatesRequest * Input for the ListCACertificates operation. * @return Result of the ListCACertificates 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.ListCACertificates */ @Override public ListCaCertificatesResponse listCACertificates(ListCaCertificatesRequest listCaCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCaCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCaCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCACertificates"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListCACertificates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listCaCertificatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCaCertificatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the CA certificates registered for your Amazon Web Services account. *

*

* The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional * results. *

*

* Requires permission to access the ListCACertificates action. *

*
*

* This is a variant of * {@link #listCACertificates(software.amazon.awssdk.services.iot.model.ListCaCertificatesRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCACertificatesIterable responses = client.listCACertificatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListCACertificatesIterable responses = client
     *             .listCACertificatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListCaCertificatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCACertificatesIterable responses = client.listCACertificatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listCACertificates(software.amazon.awssdk.services.iot.model.ListCaCertificatesRequest)} operation. *

* * @param listCaCertificatesRequest * Input for the ListCACertificates operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListCACertificates */ @Override public ListCACertificatesIterable listCACertificatesPaginator(ListCaCertificatesRequest listCaCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListCACertificatesIterable(this, applyPaginatorUserAgent(listCaCertificatesRequest)); } /** *

* Lists the certificates registered in your Amazon Web Services account. *

*

* The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional * results. *

*

* Requires permission to access the ListCertificates action. *

* * @param listCertificatesRequest * The input for the ListCertificates operation. * @return Result of the ListCertificates 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.ListCertificates */ @Override public ListCertificatesResponse listCertificates(ListCertificatesRequest listCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCertificates"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListCertificates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listCertificatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCertificatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the certificates registered in your Amazon Web Services account. *

*

* The results are paginated with a default page size of 25. You can use the returned marker to retrieve additional * results. *

*

* Requires permission to access the ListCertificates action. *

*
*

* This is a variant of {@link #listCertificates(software.amazon.awssdk.services.iot.model.ListCertificatesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCertificatesIterable responses = client.listCertificatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListCertificatesIterable responses = client.listCertificatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListCertificatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCertificatesIterable responses = client.listCertificatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listCertificates(software.amazon.awssdk.services.iot.model.ListCertificatesRequest)} operation. *

* * @param listCertificatesRequest * The input for the ListCertificates operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListCertificates */ @Override public ListCertificatesIterable listCertificatesPaginator(ListCertificatesRequest listCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListCertificatesIterable(this, applyPaginatorUserAgent(listCertificatesRequest)); } /** *

* List the device certificates signed by the specified CA certificate. *

*

* Requires permission to access the ListCertificatesByCA action. *

* * @param listCertificatesByCaRequest * The input to the ListCertificatesByCA operation. * @return Result of the ListCertificatesByCA 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.ListCertificatesByCA */ @Override public ListCertificatesByCaResponse listCertificatesByCA(ListCertificatesByCaRequest listCertificatesByCaRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCertificatesByCaResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCertificatesByCaRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCertificatesByCA"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListCertificatesByCA").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listCertificatesByCaRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCertificatesByCaRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List the device certificates signed by the specified CA certificate. *

*

* Requires permission to access the ListCertificatesByCA action. *

*
*

* This is a variant of * {@link #listCertificatesByCA(software.amazon.awssdk.services.iot.model.ListCertificatesByCaRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCertificatesByCAIterable responses = client.listCertificatesByCAPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListCertificatesByCAIterable responses = client
     *             .listCertificatesByCAPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListCertificatesByCaResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCertificatesByCAIterable responses = client.listCertificatesByCAPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listCertificatesByCA(software.amazon.awssdk.services.iot.model.ListCertificatesByCaRequest)} * operation. *

* * @param listCertificatesByCaRequest * The input to the ListCertificatesByCA operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListCertificatesByCA */ @Override public ListCertificatesByCAIterable listCertificatesByCAPaginator(ListCertificatesByCaRequest listCertificatesByCaRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListCertificatesByCAIterable(this, applyPaginatorUserAgent(listCertificatesByCaRequest)); } /** *

* Lists your Device Defender detect custom metrics. *

*

* Requires permission to access the ListCustomMetrics action. *

* * @param listCustomMetricsRequest * @return Result of the ListCustomMetrics 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.ListCustomMetrics */ @Override public ListCustomMetricsResponse listCustomMetrics(ListCustomMetricsRequest listCustomMetricsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListCustomMetricsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCustomMetricsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCustomMetrics"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListCustomMetrics").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listCustomMetricsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCustomMetricsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists your Device Defender detect custom metrics. *

*

* Requires permission to access the ListCustomMetrics action. *

*
*

* This is a variant of * {@link #listCustomMetrics(software.amazon.awssdk.services.iot.model.ListCustomMetricsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCustomMetricsIterable responses = client.listCustomMetricsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListCustomMetricsIterable responses = client
     *             .listCustomMetricsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListCustomMetricsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListCustomMetricsIterable responses = client.listCustomMetricsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listCustomMetrics(software.amazon.awssdk.services.iot.model.ListCustomMetricsRequest)} operation. *

* * @param listCustomMetricsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListCustomMetrics */ @Override public ListCustomMetricsIterable listCustomMetricsPaginator(ListCustomMetricsRequest listCustomMetricsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListCustomMetricsIterable(this, applyPaginatorUserAgent(listCustomMetricsRequest)); } /** *

* Lists mitigation actions executions for a Device Defender ML Detect Security Profile. *

*

* Requires permission to access the ListDetectMitigationActionsExecutions action. *

* * @param listDetectMitigationActionsExecutionsRequest * @return Result of the ListDetectMitigationActionsExecutions 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.ListDetectMitigationActionsExecutions */ @Override public ListDetectMitigationActionsExecutionsResponse listDetectMitigationActionsExecutions( ListDetectMitigationActionsExecutionsRequest listDetectMitigationActionsExecutionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListDetectMitigationActionsExecutionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDetectMitigationActionsExecutionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDetectMitigationActionsExecutions"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDetectMitigationActionsExecutions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withInput(listDetectMitigationActionsExecutionsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDetectMitigationActionsExecutionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists mitigation actions executions for a Device Defender ML Detect Security Profile. *

*

* Requires permission to access the ListDetectMitigationActionsExecutions action. *

*
*

* This is a variant of * {@link #listDetectMitigationActionsExecutions(software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsExecutionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsExecutionsIterable responses = client.listDetectMitigationActionsExecutionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsExecutionsIterable responses = client
     *             .listDetectMitigationActionsExecutionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsExecutionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsExecutionsIterable responses = client.listDetectMitigationActionsExecutionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDetectMitigationActionsExecutions(software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsExecutionsRequest)} * operation. *

* * @param listDetectMitigationActionsExecutionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListDetectMitigationActionsExecutions */ @Override public ListDetectMitigationActionsExecutionsIterable listDetectMitigationActionsExecutionsPaginator( ListDetectMitigationActionsExecutionsRequest listDetectMitigationActionsExecutionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListDetectMitigationActionsExecutionsIterable(this, applyPaginatorUserAgent(listDetectMitigationActionsExecutionsRequest)); } /** *

* List of Device Defender ML Detect mitigation actions tasks. *

*

* Requires permission to access the ListDetectMitigationActionsTasks action. *

* * @param listDetectMitigationActionsTasksRequest * @return Result of the ListDetectMitigationActionsTasks 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.ListDetectMitigationActionsTasks */ @Override public ListDetectMitigationActionsTasksResponse listDetectMitigationActionsTasks( ListDetectMitigationActionsTasksRequest listDetectMitigationActionsTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDetectMitigationActionsTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDetectMitigationActionsTasksRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDetectMitigationActionsTasks"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDetectMitigationActionsTasks").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDetectMitigationActionsTasksRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDetectMitigationActionsTasksRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List of Device Defender ML Detect mitigation actions tasks. *

*

* Requires permission to access the ListDetectMitigationActionsTasks action. *

*
*

* This is a variant of * {@link #listDetectMitigationActionsTasks(software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsTasksRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsTasksIterable responses = client.listDetectMitigationActionsTasksPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsTasksIterable responses = client
     *             .listDetectMitigationActionsTasksPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsTasksResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDetectMitigationActionsTasksIterable responses = client.listDetectMitigationActionsTasksPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDetectMitigationActionsTasks(software.amazon.awssdk.services.iot.model.ListDetectMitigationActionsTasksRequest)} * operation. *

* * @param listDetectMitigationActionsTasksRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListDetectMitigationActionsTasks */ @Override public ListDetectMitigationActionsTasksIterable listDetectMitigationActionsTasksPaginator( ListDetectMitigationActionsTasksRequest listDetectMitigationActionsTasksRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListDetectMitigationActionsTasksIterable(this, applyPaginatorUserAgent(listDetectMitigationActionsTasksRequest)); } /** *

* List the set of dimensions that are defined for your Amazon Web Services accounts. *

*

* Requires permission to access the ListDimensions action. *

* * @param listDimensionsRequest * @return Result of the ListDimensions 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.ListDimensions */ @Override public ListDimensionsResponse listDimensions(ListDimensionsRequest listDimensionsRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDimensionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDimensionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDimensions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDimensions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDimensionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDimensionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List the set of dimensions that are defined for your Amazon Web Services accounts. *

*

* Requires permission to access the ListDimensions action. *

*
*

* This is a variant of {@link #listDimensions(software.amazon.awssdk.services.iot.model.ListDimensionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDimensionsIterable responses = client.listDimensionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListDimensionsIterable responses = client.listDimensionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListDimensionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDimensionsIterable responses = client.listDimensionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDimensions(software.amazon.awssdk.services.iot.model.ListDimensionsRequest)} operation. *

* * @param listDimensionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListDimensions */ @Override public ListDimensionsIterable listDimensionsPaginator(ListDimensionsRequest listDimensionsRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListDimensionsIterable(this, applyPaginatorUserAgent(listDimensionsRequest)); } /** *

* Gets a list of domain configurations for the user. This list is sorted alphabetically by domain configuration * name. *

*

* Requires permission to access the ListDomainConfigurations action. *

* * @param listDomainConfigurationsRequest * @return Result of the ListDomainConfigurations 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.ListDomainConfigurations */ @Override public ListDomainConfigurationsResponse listDomainConfigurations( ListDomainConfigurationsRequest listDomainConfigurationsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListDomainConfigurationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listDomainConfigurationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDomainConfigurations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDomainConfigurations").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDomainConfigurationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDomainConfigurationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of domain configurations for the user. This list is sorted alphabetically by domain configuration * name. *

*

* Requires permission to access the ListDomainConfigurations action. *

*
*

* This is a variant of * {@link #listDomainConfigurations(software.amazon.awssdk.services.iot.model.ListDomainConfigurationsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDomainConfigurationsIterable responses = client.listDomainConfigurationsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListDomainConfigurationsIterable responses = client
     *             .listDomainConfigurationsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListDomainConfigurationsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListDomainConfigurationsIterable responses = client.listDomainConfigurationsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDomainConfigurations(software.amazon.awssdk.services.iot.model.ListDomainConfigurationsRequest)} * operation. *

* * @param listDomainConfigurationsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListDomainConfigurations */ @Override public ListDomainConfigurationsIterable listDomainConfigurationsPaginator( ListDomainConfigurationsRequest listDomainConfigurationsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListDomainConfigurationsIterable(this, applyPaginatorUserAgent(listDomainConfigurationsRequest)); } /** *

* Lists all your fleet metrics. *

*

* Requires permission to access the ListFleetMetrics action. *

* * @param listFleetMetricsRequest * @return Result of the ListFleetMetrics 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.ListFleetMetrics */ @Override public ListFleetMetricsResponse listFleetMetrics(ListFleetMetricsRequest listFleetMetricsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListFleetMetricsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listFleetMetricsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListFleetMetrics"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListFleetMetrics").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listFleetMetricsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListFleetMetricsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all your fleet metrics. *

*

* Requires permission to access the ListFleetMetrics action. *

*
*

* This is a variant of {@link #listFleetMetrics(software.amazon.awssdk.services.iot.model.ListFleetMetricsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListFleetMetricsIterable responses = client.listFleetMetricsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListFleetMetricsIterable responses = client.listFleetMetricsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListFleetMetricsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListFleetMetricsIterable responses = client.listFleetMetricsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listFleetMetrics(software.amazon.awssdk.services.iot.model.ListFleetMetricsRequest)} operation. *

* * @param listFleetMetricsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListFleetMetrics */ @Override public ListFleetMetricsIterable listFleetMetricsPaginator(ListFleetMetricsRequest listFleetMetricsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListFleetMetricsIterable(this, applyPaginatorUserAgent(listFleetMetricsRequest)); } /** *

* Lists the search indices. *

*

* Requires permission to access the ListIndices action. *

* * @param listIndicesRequest * @return Result of the ListIndices 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.ListIndices */ @Override public ListIndicesResponse listIndices(ListIndicesRequest listIndicesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListIndicesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listIndicesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIndices"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListIndices").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listIndicesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListIndicesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the search indices. *

*

* Requires permission to access the ListIndices action. *

*
*

* This is a variant of {@link #listIndices(software.amazon.awssdk.services.iot.model.ListIndicesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListIndicesIterable responses = client.listIndicesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListIndicesIterable responses = client.listIndicesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListIndicesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListIndicesIterable responses = client.listIndicesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listIndices(software.amazon.awssdk.services.iot.model.ListIndicesRequest)} operation. *

* * @param listIndicesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListIndices */ @Override public ListIndicesIterable listIndicesPaginator(ListIndicesRequest listIndicesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListIndicesIterable(this, applyPaginatorUserAgent(listIndicesRequest)); } /** *

* Lists the job executions for a job. *

*

* Requires permission to access the ListJobExecutionsForJob action. *

* * @param listJobExecutionsForJobRequest * @return Result of the ListJobExecutionsForJob 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 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.ListJobExecutionsForJob */ @Override public ListJobExecutionsForJobResponse listJobExecutionsForJob(ListJobExecutionsForJobRequest listJobExecutionsForJobRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListJobExecutionsForJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobExecutionsForJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobExecutionsForJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListJobExecutionsForJob").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listJobExecutionsForJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListJobExecutionsForJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the job executions for a job. *

*

* Requires permission to access the ListJobExecutionsForJob action. *

*
*

* This is a variant of * {@link #listJobExecutionsForJob(software.amazon.awssdk.services.iot.model.ListJobExecutionsForJobRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForJobIterable responses = client.listJobExecutionsForJobPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForJobIterable responses = client
     *             .listJobExecutionsForJobPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListJobExecutionsForJobResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForJobIterable responses = client.listJobExecutionsForJobPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listJobExecutionsForJob(software.amazon.awssdk.services.iot.model.ListJobExecutionsForJobRequest)} * operation. *

* * @param listJobExecutionsForJobRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListJobExecutionsForJob */ @Override public ListJobExecutionsForJobIterable listJobExecutionsForJobPaginator( ListJobExecutionsForJobRequest listJobExecutionsForJobRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListJobExecutionsForJobIterable(this, applyPaginatorUserAgent(listJobExecutionsForJobRequest)); } /** *

* Lists the job executions for the specified thing. *

*

* Requires permission to access the ListJobExecutionsForThing action. *

* * @param listJobExecutionsForThingRequest * @return Result of the ListJobExecutionsForThing 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 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.ListJobExecutionsForThing */ @Override public ListJobExecutionsForThingResponse listJobExecutionsForThing( ListJobExecutionsForThingRequest listJobExecutionsForThingRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListJobExecutionsForThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobExecutionsForThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobExecutionsForThing"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListJobExecutionsForThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listJobExecutionsForThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListJobExecutionsForThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the job executions for the specified thing. *

*

* Requires permission to access the ListJobExecutionsForThing action. *

*
*

* This is a variant of * {@link #listJobExecutionsForThing(software.amazon.awssdk.services.iot.model.ListJobExecutionsForThingRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForThingIterable responses = client.listJobExecutionsForThingPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForThingIterable responses = client
     *             .listJobExecutionsForThingPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListJobExecutionsForThingResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobExecutionsForThingIterable responses = client.listJobExecutionsForThingPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listJobExecutionsForThing(software.amazon.awssdk.services.iot.model.ListJobExecutionsForThingRequest)} * operation. *

* * @param listJobExecutionsForThingRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListJobExecutionsForThing */ @Override public ListJobExecutionsForThingIterable listJobExecutionsForThingPaginator( ListJobExecutionsForThingRequest listJobExecutionsForThingRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListJobExecutionsForThingIterable(this, applyPaginatorUserAgent(listJobExecutionsForThingRequest)); } /** *

* Returns a list of job templates. *

*

* Requires permission to access the ListJobTemplates action. *

* * @param listJobTemplatesRequest * @return Result of the ListJobTemplates 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.ListJobTemplates */ @Override public ListJobTemplatesResponse listJobTemplates(ListJobTemplatesRequest listJobTemplatesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListJobTemplatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobTemplatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobTemplates"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListJobTemplates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listJobTemplatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListJobTemplatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of job templates. *

*

* Requires permission to access the ListJobTemplates action. *

*
*

* This is a variant of {@link #listJobTemplates(software.amazon.awssdk.services.iot.model.ListJobTemplatesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobTemplatesIterable responses = client.listJobTemplatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListJobTemplatesIterable responses = client.listJobTemplatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListJobTemplatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobTemplatesIterable responses = client.listJobTemplatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listJobTemplates(software.amazon.awssdk.services.iot.model.ListJobTemplatesRequest)} operation. *

* * @param listJobTemplatesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListJobTemplates */ @Override public ListJobTemplatesIterable listJobTemplatesPaginator(ListJobTemplatesRequest listJobTemplatesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListJobTemplatesIterable(this, applyPaginatorUserAgent(listJobTemplatesRequest)); } /** *

* Lists jobs. *

*

* Requires permission to access the ListJobs action. *

* * @param listJobsRequest * @return Result of the ListJobs 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 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.ListJobs */ @Override public ListJobsResponse listJobs(ListJobsRequest listJobsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listJobsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListJobs"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListJobs").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listJobsRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new ListJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists jobs. *

*

* Requires permission to access the ListJobs action. *

*
*

* This is a variant of {@link #listJobs(software.amazon.awssdk.services.iot.model.ListJobsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobsIterable responses = client.listJobsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListJobsIterable responses = client.listJobsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListJobsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListJobsIterable responses = client.listJobsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listJobs(software.amazon.awssdk.services.iot.model.ListJobsRequest)} operation. *

* * @param listJobsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListJobs */ @Override public ListJobsIterable listJobsPaginator(ListJobsRequest listJobsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListJobsIterable(this, applyPaginatorUserAgent(listJobsRequest)); } /** *

* Returns a list of managed job templates. *

* * @param listManagedJobTemplatesRequest * @return Result of the ListManagedJobTemplates 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 InternalServerException * Internal error from the service that indicates an unexpected error or that the service is 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.ListManagedJobTemplates */ @Override public ListManagedJobTemplatesResponse listManagedJobTemplates(ListManagedJobTemplatesRequest listManagedJobTemplatesRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListManagedJobTemplatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listManagedJobTemplatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListManagedJobTemplates"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListManagedJobTemplates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listManagedJobTemplatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListManagedJobTemplatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the values reported for an IoT Device Defender metric (device-side metric, cloud-side metric, or custom * metric) by the given thing during the specified time period. *

* * @param listMetricValuesRequest * @return Result of the ListMetricValues 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.ListMetricValues */ @Override public ListMetricValuesResponse listMetricValues(ListMetricValuesRequest listMetricValuesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListMetricValuesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMetricValuesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMetricValues"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListMetricValues").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listMetricValuesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListMetricValuesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the values reported for an IoT Device Defender metric (device-side metric, cloud-side metric, or custom * metric) by the given thing during the specified time period. *

*
*

* This is a variant of {@link #listMetricValues(software.amazon.awssdk.services.iot.model.ListMetricValuesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListMetricValuesIterable responses = client.listMetricValuesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListMetricValuesIterable responses = client.listMetricValuesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListMetricValuesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListMetricValuesIterable responses = client.listMetricValuesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listMetricValues(software.amazon.awssdk.services.iot.model.ListMetricValuesRequest)} operation. *

* * @param listMetricValuesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListMetricValues */ @Override public ListMetricValuesIterable listMetricValuesPaginator(ListMetricValuesRequest listMetricValuesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new ListMetricValuesIterable(this, applyPaginatorUserAgent(listMetricValuesRequest)); } /** *

* Gets a list of all mitigation actions that match the specified filter criteria. *

*

* Requires permission to access the ListMitigationActions action. *

* * @param listMitigationActionsRequest * @return Result of the ListMitigationActions 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.ListMitigationActions */ @Override public ListMitigationActionsResponse listMitigationActions(ListMitigationActionsRequest listMitigationActionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListMitigationActionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMitigationActionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMitigationActions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListMitigationActions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listMitigationActionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListMitigationActionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a list of all mitigation actions that match the specified filter criteria. *

*

* Requires permission to access the ListMitigationActions action. *

*
*

* This is a variant of * {@link #listMitigationActions(software.amazon.awssdk.services.iot.model.ListMitigationActionsRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListMitigationActionsIterable responses = client.listMitigationActionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListMitigationActionsIterable responses = client
     *             .listMitigationActionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListMitigationActionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListMitigationActionsIterable responses = client.listMitigationActionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listMitigationActions(software.amazon.awssdk.services.iot.model.ListMitigationActionsRequest)} * operation. *

* * @param listMitigationActionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListMitigationActions */ @Override public ListMitigationActionsIterable listMitigationActionsPaginator(ListMitigationActionsRequest listMitigationActionsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListMitigationActionsIterable(this, applyPaginatorUserAgent(listMitigationActionsRequest)); } /** *

* Lists OTA updates. *

*

* Requires permission to access the ListOTAUpdates action. *

* * @param listOtaUpdatesRequest * @return Result of the ListOTAUpdates 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 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.ListOTAUpdates */ @Override public ListOtaUpdatesResponse listOTAUpdates(ListOtaUpdatesRequest listOtaUpdatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListOtaUpdatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listOtaUpdatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOTAUpdates"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListOTAUpdates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listOtaUpdatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListOtaUpdatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists OTA updates. *

*

* Requires permission to access the ListOTAUpdates action. *

*
*

* This is a variant of {@link #listOTAUpdates(software.amazon.awssdk.services.iot.model.ListOtaUpdatesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListOTAUpdatesIterable responses = client.listOTAUpdatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListOTAUpdatesIterable responses = client.listOTAUpdatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListOtaUpdatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListOTAUpdatesIterable responses = client.listOTAUpdatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listOTAUpdates(software.amazon.awssdk.services.iot.model.ListOtaUpdatesRequest)} operation. *

* * @param listOtaUpdatesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListOTAUpdates */ @Override public ListOTAUpdatesIterable listOTAUpdatesPaginator(ListOtaUpdatesRequest listOtaUpdatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListOTAUpdatesIterable(this, applyPaginatorUserAgent(listOtaUpdatesRequest)); } /** *

* Lists certificates that are being transferred but not yet accepted. *

*

* Requires permission to access the ListOutgoingCertificates action. *

* * @param listOutgoingCertificatesRequest * The input to the ListOutgoingCertificates operation. * @return Result of the ListOutgoingCertificates 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.ListOutgoingCertificates */ @Override public ListOutgoingCertificatesResponse listOutgoingCertificates( ListOutgoingCertificatesRequest listOutgoingCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListOutgoingCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listOutgoingCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOutgoingCertificates"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListOutgoingCertificates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listOutgoingCertificatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListOutgoingCertificatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists certificates that are being transferred but not yet accepted. *

*

* Requires permission to access the ListOutgoingCertificates action. *

*
*

* This is a variant of * {@link #listOutgoingCertificates(software.amazon.awssdk.services.iot.model.ListOutgoingCertificatesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListOutgoingCertificatesIterable responses = client.listOutgoingCertificatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListOutgoingCertificatesIterable responses = client
     *             .listOutgoingCertificatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListOutgoingCertificatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListOutgoingCertificatesIterable responses = client.listOutgoingCertificatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listOutgoingCertificates(software.amazon.awssdk.services.iot.model.ListOutgoingCertificatesRequest)} * operation. *

* * @param listOutgoingCertificatesRequest * The input to the ListOutgoingCertificates operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListOutgoingCertificates */ @Override public ListOutgoingCertificatesIterable listOutgoingCertificatesPaginator( ListOutgoingCertificatesRequest listOutgoingCertificatesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListOutgoingCertificatesIterable(this, applyPaginatorUserAgent(listOutgoingCertificatesRequest)); } /** *

* Lists your policies. *

*

* Requires permission to access the ListPolicies action. *

* * @param listPoliciesRequest * The input for the ListPolicies operation. * @return Result of the ListPolicies 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.ListPolicies */ @Override public ListPoliciesResponse listPolicies(ListPoliciesRequest listPoliciesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListPoliciesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPoliciesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicies"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListPolicies").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPoliciesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListPoliciesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists your policies. *

*

* Requires permission to access the ListPolicies action. *

*
*

* This is a variant of {@link #listPolicies(software.amazon.awssdk.services.iot.model.ListPoliciesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListPoliciesIterable responses = client.listPoliciesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListPoliciesIterable responses = client.listPoliciesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListPoliciesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListPoliciesIterable responses = client.listPoliciesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPolicies(software.amazon.awssdk.services.iot.model.ListPoliciesRequest)} operation. *

* * @param listPoliciesRequest * The input for the ListPolicies operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListPolicies */ @Override public ListPoliciesIterable listPoliciesPaginator(ListPoliciesRequest listPoliciesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListPoliciesIterable(this, applyPaginatorUserAgent(listPoliciesRequest)); } /** *

* Lists the versions of the specified policy and identifies the default version. *

*

* Requires permission to access the ListPolicyVersions action. *

* * @param listPolicyVersionsRequest * The input for the ListPolicyVersions operation. * @return Result of the ListPolicyVersions 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.ListPolicyVersions */ @Override public ListPolicyVersionsResponse listPolicyVersions(ListPolicyVersionsRequest listPolicyVersionsRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPolicyVersionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPolicyVersionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPolicyVersions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListPolicyVersions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPolicyVersionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListPolicyVersionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, * groups, and roles, Amazon Cognito identities or federated identities. *

*

* Requires permission to access the ListPrincipalThings action. *

* * @param listPrincipalThingsRequest * The input for the ListPrincipalThings operation. * @return Result of the ListPrincipalThings operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListPrincipalThings */ @Override public ListPrincipalThingsResponse listPrincipalThings(ListPrincipalThingsRequest listPrincipalThingsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPrincipalThingsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listPrincipalThingsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPrincipalThings"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListPrincipalThings").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPrincipalThingsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListPrincipalThingsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the things associated with the specified principal. A principal can be X.509 certificates, IAM users, * groups, and roles, Amazon Cognito identities or federated identities. *

*

* Requires permission to access the ListPrincipalThings action. *

*
*

* This is a variant of * {@link #listPrincipalThings(software.amazon.awssdk.services.iot.model.ListPrincipalThingsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsIterable responses = client.listPrincipalThingsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsIterable responses = client
     *             .listPrincipalThingsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListPrincipalThingsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListPrincipalThingsIterable responses = client.listPrincipalThingsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPrincipalThings(software.amazon.awssdk.services.iot.model.ListPrincipalThingsRequest)} operation. *

* * @param listPrincipalThingsRequest * The input for the ListPrincipalThings operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListPrincipalThings */ @Override public ListPrincipalThingsIterable listPrincipalThingsPaginator(ListPrincipalThingsRequest listPrincipalThingsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new ListPrincipalThingsIterable(this, applyPaginatorUserAgent(listPrincipalThingsRequest)); } /** *

* A list of provisioning template versions. *

*

* Requires permission to access the ListProvisioningTemplateVersions action. *

* * @param listProvisioningTemplateVersionsRequest * @return Result of the ListProvisioningTemplateVersions operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws 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.ListProvisioningTemplateVersions */ @Override public ListProvisioningTemplateVersionsResponse listProvisioningTemplateVersions( ListProvisioningTemplateVersionsRequest listProvisioningTemplateVersionsRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, ResourceNotFoundException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListProvisioningTemplateVersionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listProvisioningTemplateVersionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListProvisioningTemplateVersions"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListProvisioningTemplateVersions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listProvisioningTemplateVersionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListProvisioningTemplateVersionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* A list of provisioning template versions. *

*

* Requires permission to access the ListProvisioningTemplateVersions action. *

*
*

* This is a variant of * {@link #listProvisioningTemplateVersions(software.amazon.awssdk.services.iot.model.ListProvisioningTemplateVersionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsIterable responses = client.listProvisioningTemplateVersionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsIterable responses = client
     *             .listProvisioningTemplateVersionsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListProvisioningTemplateVersionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplateVersionsIterable responses = client.listProvisioningTemplateVersionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listProvisioningTemplateVersions(software.amazon.awssdk.services.iot.model.ListProvisioningTemplateVersionsRequest)} * operation. *

* * @param listProvisioningTemplateVersionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListProvisioningTemplateVersions */ @Override public ListProvisioningTemplateVersionsIterable listProvisioningTemplateVersionsPaginator( ListProvisioningTemplateVersionsRequest listProvisioningTemplateVersionsRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, ResourceNotFoundException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { return new ListProvisioningTemplateVersionsIterable(this, applyPaginatorUserAgent(listProvisioningTemplateVersionsRequest)); } /** *

* Lists the provisioning templates in your Amazon Web Services account. *

*

* Requires permission to access the ListProvisioningTemplates action. *

* * @param listProvisioningTemplatesRequest * @return Result of the ListProvisioningTemplates 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 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.ListProvisioningTemplates */ @Override public ListProvisioningTemplatesResponse listProvisioningTemplates( ListProvisioningTemplatesRequest listProvisioningTemplatesRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListProvisioningTemplatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listProvisioningTemplatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListProvisioningTemplates"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListProvisioningTemplates").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listProvisioningTemplatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListProvisioningTemplatesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the provisioning templates in your Amazon Web Services account. *

*

* Requires permission to access the ListProvisioningTemplates action. *

*
*

* This is a variant of * {@link #listProvisioningTemplates(software.amazon.awssdk.services.iot.model.ListProvisioningTemplatesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplatesIterable responses = client.listProvisioningTemplatesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplatesIterable responses = client
     *             .listProvisioningTemplatesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListProvisioningTemplatesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListProvisioningTemplatesIterable responses = client.listProvisioningTemplatesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listProvisioningTemplates(software.amazon.awssdk.services.iot.model.ListProvisioningTemplatesRequest)} * operation. *

* * @param listProvisioningTemplatesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalFailureException * An unexpected error has occurred. * @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 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.ListProvisioningTemplates */ @Override public ListProvisioningTemplatesIterable listProvisioningTemplatesPaginator( ListProvisioningTemplatesRequest listProvisioningTemplatesRequest) throws InternalFailureException, InvalidRequestException, ThrottlingException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { return new ListProvisioningTemplatesIterable(this, applyPaginatorUserAgent(listProvisioningTemplatesRequest)); } /** *

* Lists the role aliases registered in your account. *

*

* Requires permission to access the ListRoleAliases action. *

* * @param listRoleAliasesRequest * @return Result of the ListRoleAliases 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.ListRoleAliases */ @Override public ListRoleAliasesResponse listRoleAliases(ListRoleAliasesRequest listRoleAliasesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListRoleAliasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRoleAliasesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoleAliases"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListRoleAliases").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listRoleAliasesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListRoleAliasesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the role aliases registered in your account. *

*

* Requires permission to access the ListRoleAliases action. *

*
*

* This is a variant of {@link #listRoleAliases(software.amazon.awssdk.services.iot.model.ListRoleAliasesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListRoleAliasesIterable responses = client.listRoleAliasesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListRoleAliasesIterable responses = client.listRoleAliasesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListRoleAliasesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListRoleAliasesIterable responses = client.listRoleAliasesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listRoleAliases(software.amazon.awssdk.services.iot.model.ListRoleAliasesRequest)} operation. *

* * @param listRoleAliasesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListRoleAliases */ @Override public ListRoleAliasesIterable listRoleAliasesPaginator(ListRoleAliasesRequest listRoleAliasesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListRoleAliasesIterable(this, applyPaginatorUserAgent(listRoleAliasesRequest)); } /** *

* Lists all of your scheduled audits. *

*

* Requires permission to access the ListScheduledAudits action. *

* * @param listScheduledAuditsRequest * @return Result of the ListScheduledAudits 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.ListScheduledAudits */ @Override public ListScheduledAuditsResponse listScheduledAudits(ListScheduledAuditsRequest listScheduledAuditsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListScheduledAuditsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listScheduledAuditsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListScheduledAudits"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListScheduledAudits").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listScheduledAuditsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListScheduledAuditsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all of your scheduled audits. *

*

* Requires permission to access the ListScheduledAudits action. *

*
*

* This is a variant of * {@link #listScheduledAudits(software.amazon.awssdk.services.iot.model.ListScheduledAuditsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListScheduledAuditsIterable responses = client.listScheduledAuditsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListScheduledAuditsIterable responses = client
     *             .listScheduledAuditsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListScheduledAuditsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListScheduledAuditsIterable responses = client.listScheduledAuditsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listScheduledAudits(software.amazon.awssdk.services.iot.model.ListScheduledAuditsRequest)} operation. *

* * @param listScheduledAuditsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListScheduledAudits */ @Override public ListScheduledAuditsIterable listScheduledAuditsPaginator(ListScheduledAuditsRequest listScheduledAuditsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListScheduledAuditsIterable(this, applyPaginatorUserAgent(listScheduledAuditsRequest)); } /** *

* Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or * custom metric. *

*

* Requires permission to access the ListSecurityProfiles action. *

* *

* dimensionName and metricName cannot be used in the same request. *

*
* * @param listSecurityProfilesRequest * @return Result of the ListSecurityProfiles 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.ListSecurityProfiles */ @Override public ListSecurityProfilesResponse listSecurityProfiles(ListSecurityProfilesRequest listSecurityProfilesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityProfiles"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListSecurityProfiles").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listSecurityProfilesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSecurityProfilesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or * custom metric. *

*

* Requires permission to access the ListSecurityProfiles action. *

* *

* dimensionName and metricName cannot be used in the same request. *

*

*

* This is a variant of * {@link #listSecurityProfiles(software.amazon.awssdk.services.iot.model.ListSecurityProfilesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesIterable responses = client.listSecurityProfilesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesIterable responses = client
     *             .listSecurityProfilesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListSecurityProfilesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesIterable responses = client.listSecurityProfilesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSecurityProfiles(software.amazon.awssdk.services.iot.model.ListSecurityProfilesRequest)} * operation. *

* * @param listSecurityProfilesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListSecurityProfiles */ @Override public ListSecurityProfilesIterable listSecurityProfilesPaginator(ListSecurityProfilesRequest listSecurityProfilesRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new ListSecurityProfilesIterable(this, applyPaginatorUserAgent(listSecurityProfilesRequest)); } /** *

* Lists the Device Defender security profiles attached to a target (thing group). *

*

* Requires permission to access the ListSecurityProfilesForTarget action. *

* * @param listSecurityProfilesForTargetRequest * @return Result of the ListSecurityProfilesForTarget 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.ListSecurityProfilesForTarget */ @Override public ListSecurityProfilesForTargetResponse listSecurityProfilesForTarget( ListSecurityProfilesForTargetRequest listSecurityProfilesForTargetRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSecurityProfilesForTargetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSecurityProfilesForTargetRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSecurityProfilesForTarget"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSecurityProfilesForTarget").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listSecurityProfilesForTargetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSecurityProfilesForTargetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the Device Defender security profiles attached to a target (thing group). *

*

* Requires permission to access the ListSecurityProfilesForTarget action. *

*
*

* This is a variant of * {@link #listSecurityProfilesForTarget(software.amazon.awssdk.services.iot.model.ListSecurityProfilesForTargetRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesForTargetIterable responses = client.listSecurityProfilesForTargetPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesForTargetIterable responses = client
     *             .listSecurityProfilesForTargetPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListSecurityProfilesForTargetResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListSecurityProfilesForTargetIterable responses = client.listSecurityProfilesForTargetPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listSecurityProfilesForTarget(software.amazon.awssdk.services.iot.model.ListSecurityProfilesForTargetRequest)} * operation. *

* * @param listSecurityProfilesForTargetRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListSecurityProfilesForTarget */ @Override public ListSecurityProfilesForTargetIterable listSecurityProfilesForTargetPaginator( ListSecurityProfilesForTargetRequest listSecurityProfilesForTargetRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new ListSecurityProfilesForTargetIterable(this, applyPaginatorUserAgent(listSecurityProfilesForTargetRequest)); } /** *

* Lists all of the streams in your Amazon Web Services account. *

*

* Requires permission to access the ListStreams action. *

* * @param listStreamsRequest * @return Result of the ListStreams 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.ListStreams */ @Override public ListStreamsResponse listStreams(ListStreamsRequest listStreamsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListStreamsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStreamsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStreams"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStreams").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStreamsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStreamsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all of the streams in your Amazon Web Services account. *

*

* Requires permission to access the ListStreams action. *

*
*

* This is a variant of {@link #listStreams(software.amazon.awssdk.services.iot.model.ListStreamsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListStreamsIterable responses = client.listStreamsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListStreamsIterable responses = client.listStreamsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListStreamsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListStreamsIterable responses = client.listStreamsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStreams(software.amazon.awssdk.services.iot.model.ListStreamsRequest)} operation. *

* * @param listStreamsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListStreams */ @Override public ListStreamsIterable listStreamsPaginator(ListStreamsRequest listStreamsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListStreamsIterable(this, applyPaginatorUserAgent(listStreamsRequest)); } /** *

* Lists the tags (metadata) you have assigned to the resource. *

*

* Requires permission to access the ListTagsForResource action. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListTagsForResource */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTagsForResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the tags (metadata) you have assigned to the resource. *

*

* Requires permission to access the ListTagsForResource action. *

*
*

* This is a variant of * {@link #listTagsForResource(software.amazon.awssdk.services.iot.model.ListTagsForResourceRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTagsForResourceIterable responses = client.listTagsForResourcePaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListTagsForResourceIterable responses = client
     *             .listTagsForResourcePaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListTagsForResourceResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTagsForResourceIterable responses = client.listTagsForResourcePaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listTagsForResource(software.amazon.awssdk.services.iot.model.ListTagsForResourceRequest)} operation. *

* * @param listTagsForResourceRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListTagsForResource */ @Override public ListTagsForResourceIterable listTagsForResourcePaginator(ListTagsForResourceRequest listTagsForResourceRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListTagsForResourceIterable(this, applyPaginatorUserAgent(listTagsForResourceRequest)); } /** *

* List targets for the specified policy. *

*

* Requires permission to access the ListTargetsForPolicy action. *

* * @param listTargetsForPolicyRequest * @return Result of the ListTargetsForPolicy 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.ListTargetsForPolicy */ @Override public ListTargetsForPolicyResponse listTargetsForPolicy(ListTargetsForPolicyRequest listTargetsForPolicyRequest) 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, ListTargetsForPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTargetsForPolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTargetsForPolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTargetsForPolicy").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTargetsForPolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTargetsForPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List targets for the specified policy. *

*

* Requires permission to access the ListTargetsForPolicy action. *

*
*

* This is a variant of * {@link #listTargetsForPolicy(software.amazon.awssdk.services.iot.model.ListTargetsForPolicyRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTargetsForPolicyIterable responses = client.listTargetsForPolicyPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListTargetsForPolicyIterable responses = client
     *             .listTargetsForPolicyPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListTargetsForPolicyResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTargetsForPolicyIterable responses = client.listTargetsForPolicyPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of pageSize won't limit the number of results you get with the paginator. * It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listTargetsForPolicy(software.amazon.awssdk.services.iot.model.ListTargetsForPolicyRequest)} * operation. *

* * @param listTargetsForPolicyRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListTargetsForPolicy */ @Override public ListTargetsForPolicyIterable listTargetsForPolicyPaginator(ListTargetsForPolicyRequest listTargetsForPolicyRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException { return new ListTargetsForPolicyIterable(this, applyPaginatorUserAgent(listTargetsForPolicyRequest)); } /** *

* Lists the targets (thing groups) associated with a given Device Defender security profile. *

*

* Requires permission to access the ListTargetsForSecurityProfile action. *

* * @param listTargetsForSecurityProfileRequest * @return Result of the ListTargetsForSecurityProfile 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.ListTargetsForSecurityProfile */ @Override public ListTargetsForSecurityProfileResponse listTargetsForSecurityProfile( ListTargetsForSecurityProfileRequest listTargetsForSecurityProfileRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTargetsForSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTargetsForSecurityProfileRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTargetsForSecurityProfile"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTargetsForSecurityProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTargetsForSecurityProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTargetsForSecurityProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the targets (thing groups) associated with a given Device Defender security profile. *

*

* Requires permission to access the ListTargetsForSecurityProfile action. *

*
*

* This is a variant of * {@link #listTargetsForSecurityProfile(software.amazon.awssdk.services.iot.model.ListTargetsForSecurityProfileRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTargetsForSecurityProfileIterable responses = client.listTargetsForSecurityProfilePaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListTargetsForSecurityProfileIterable responses = client
     *             .listTargetsForSecurityProfilePaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListTargetsForSecurityProfileResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTargetsForSecurityProfileIterable responses = client.listTargetsForSecurityProfilePaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listTargetsForSecurityProfile(software.amazon.awssdk.services.iot.model.ListTargetsForSecurityProfileRequest)} * operation. *

* * @param listTargetsForSecurityProfileRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListTargetsForSecurityProfile */ @Override public ListTargetsForSecurityProfileIterable listTargetsForSecurityProfilePaginator( ListTargetsForSecurityProfileRequest listTargetsForSecurityProfileRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListTargetsForSecurityProfileIterable(this, applyPaginatorUserAgent(listTargetsForSecurityProfileRequest)); } /** *

* List the thing groups in your account. *

*

* Requires permission to access the ListThingGroups action. *

* * @param listThingGroupsRequest * @return Result of the ListThingGroups operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingGroups */ @Override public ListThingGroupsResponse listThingGroups(ListThingGroupsRequest listThingGroupsRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListThingGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingGroups"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListThingGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List the thing groups in your account. *

*

* Requires permission to access the ListThingGroups action. *

*
*

* This is a variant of {@link #listThingGroups(software.amazon.awssdk.services.iot.model.ListThingGroupsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingGroupsIterable responses = client.listThingGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingGroupsIterable responses = client.listThingGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingGroupsIterable responses = client.listThingGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingGroups(software.amazon.awssdk.services.iot.model.ListThingGroupsRequest)} operation. *

* * @param listThingGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingGroups */ @Override public ListThingGroupsIterable listThingGroupsPaginator(ListThingGroupsRequest listThingGroupsRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListThingGroupsIterable(this, applyPaginatorUserAgent(listThingGroupsRequest)); } /** *

* List the thing groups to which the specified thing belongs. *

*

* Requires permission to access the ListThingGroupsForThing action. *

* * @param listThingGroupsForThingRequest * @return Result of the ListThingGroupsForThing operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingGroupsForThing */ @Override public ListThingGroupsForThingResponse listThingGroupsForThing(ListThingGroupsForThingRequest listThingGroupsForThingRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingGroupsForThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingGroupsForThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingGroupsForThing"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListThingGroupsForThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingGroupsForThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingGroupsForThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List the thing groups to which the specified thing belongs. *

*

* Requires permission to access the ListThingGroupsForThing action. *

*
*

* This is a variant of * {@link #listThingGroupsForThing(software.amazon.awssdk.services.iot.model.ListThingGroupsForThingRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingGroupsForThingIterable responses = client.listThingGroupsForThingPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingGroupsForThingIterable responses = client
     *             .listThingGroupsForThingPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingGroupsForThingResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingGroupsForThingIterable responses = client.listThingGroupsForThingPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingGroupsForThing(software.amazon.awssdk.services.iot.model.ListThingGroupsForThingRequest)} * operation. *

* * @param listThingGroupsForThingRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingGroupsForThing */ @Override public ListThingGroupsForThingIterable listThingGroupsForThingPaginator( ListThingGroupsForThingRequest listThingGroupsForThingRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListThingGroupsForThingIterable(this, applyPaginatorUserAgent(listThingGroupsForThingRequest)); } /** *

* Lists the principals associated with 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 ListThingPrincipals action. *

* * @param listThingPrincipalsRequest * The input for the ListThingPrincipal operation. * @return Result of the ListThingPrincipals operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingPrincipals */ @Override public ListThingPrincipalsResponse listThingPrincipals(ListThingPrincipalsRequest listThingPrincipalsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingPrincipalsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingPrincipalsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingPrincipals"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListThingPrincipals").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingPrincipalsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingPrincipalsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the principals associated with 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 ListThingPrincipals action. *

*
*

* This is a variant of * {@link #listThingPrincipals(software.amazon.awssdk.services.iot.model.ListThingPrincipalsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingPrincipalsIterable responses = client.listThingPrincipalsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingPrincipalsIterable responses = client
     *             .listThingPrincipalsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingPrincipalsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingPrincipalsIterable responses = client.listThingPrincipalsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingPrincipals(software.amazon.awssdk.services.iot.model.ListThingPrincipalsRequest)} operation. *

* * @param listThingPrincipalsRequest * The input for the ListThingPrincipal operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListThingPrincipals */ @Override public ListThingPrincipalsIterable listThingPrincipalsPaginator(ListThingPrincipalsRequest listThingPrincipalsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { return new ListThingPrincipalsIterable(this, applyPaginatorUserAgent(listThingPrincipalsRequest)); } /** *

* Information about the thing registration tasks. *

* * @param listThingRegistrationTaskReportsRequest * @return Result of the ListThingRegistrationTaskReports 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 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.ListThingRegistrationTaskReports */ @Override public ListThingRegistrationTaskReportsResponse listThingRegistrationTaskReports( ListThingRegistrationTaskReportsRequest listThingRegistrationTaskReportsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingRegistrationTaskReportsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingRegistrationTaskReportsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingRegistrationTaskReports"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListThingRegistrationTaskReports").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingRegistrationTaskReportsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingRegistrationTaskReportsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Information about the thing registration tasks. *

*
*

* This is a variant of * {@link #listThingRegistrationTaskReports(software.amazon.awssdk.services.iot.model.ListThingRegistrationTaskReportsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTaskReportsIterable responses = client.listThingRegistrationTaskReportsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTaskReportsIterable responses = client
     *             .listThingRegistrationTaskReportsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingRegistrationTaskReportsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTaskReportsIterable responses = client.listThingRegistrationTaskReportsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingRegistrationTaskReports(software.amazon.awssdk.services.iot.model.ListThingRegistrationTaskReportsRequest)} * operation. *

* * @param listThingRegistrationTaskReportsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListThingRegistrationTaskReports */ @Override public ListThingRegistrationTaskReportsIterable listThingRegistrationTaskReportsPaginator( ListThingRegistrationTaskReportsRequest listThingRegistrationTaskReportsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListThingRegistrationTaskReportsIterable(this, applyPaginatorUserAgent(listThingRegistrationTaskReportsRequest)); } /** *

* List bulk thing provisioning tasks. *

*

* Requires permission to access the ListThingRegistrationTasks action. *

* * @param listThingRegistrationTasksRequest * @return Result of the ListThingRegistrationTasks 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 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.ListThingRegistrationTasks */ @Override public ListThingRegistrationTasksResponse listThingRegistrationTasks( ListThingRegistrationTasksRequest listThingRegistrationTasksRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingRegistrationTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingRegistrationTasksRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingRegistrationTasks"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListThingRegistrationTasks").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingRegistrationTasksRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingRegistrationTasksRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List bulk thing provisioning tasks. *

*

* Requires permission to access the ListThingRegistrationTasks action. *

*
*

* This is a variant of * {@link #listThingRegistrationTasks(software.amazon.awssdk.services.iot.model.ListThingRegistrationTasksRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTasksIterable responses = client.listThingRegistrationTasksPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTasksIterable responses = client
     *             .listThingRegistrationTasksPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingRegistrationTasksResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingRegistrationTasksIterable responses = client.listThingRegistrationTasksPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingRegistrationTasks(software.amazon.awssdk.services.iot.model.ListThingRegistrationTasksRequest)} * operation. *

* * @param listThingRegistrationTasksRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListThingRegistrationTasks */ @Override public ListThingRegistrationTasksIterable listThingRegistrationTasksPaginator( ListThingRegistrationTasksRequest listThingRegistrationTasksRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListThingRegistrationTasksIterable(this, applyPaginatorUserAgent(listThingRegistrationTasksRequest)); } /** *

* Lists the existing thing types. *

*

* Requires permission to access the ListThingTypes action. *

* * @param listThingTypesRequest * The input for the ListThingTypes operation. * @return Result of the ListThingTypes 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.ListThingTypes */ @Override public ListThingTypesResponse listThingTypes(ListThingTypesRequest listThingTypesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListThingTypesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingTypesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingTypes"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListThingTypes").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingTypesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingTypesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the existing thing types. *

*

* Requires permission to access the ListThingTypes action. *

*
*

* This is a variant of {@link #listThingTypes(software.amazon.awssdk.services.iot.model.ListThingTypesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingTypesIterable responses = client.listThingTypesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingTypesIterable responses = client.listThingTypesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingTypesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingTypesIterable responses = client.listThingTypesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingTypes(software.amazon.awssdk.services.iot.model.ListThingTypesRequest)} operation. *

* * @param listThingTypesRequest * The input for the ListThingTypes operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListThingTypes */ @Override public ListThingTypesIterable listThingTypesPaginator(ListThingTypesRequest listThingTypesRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListThingTypesIterable(this, applyPaginatorUserAgent(listThingTypesRequest)); } /** *

* Lists your things. Use the attributeName and attributeValue parameters to filter your things. For * example, calling ListThings with attributeName=Color and attributeValue=Red retrieves all things in * the registry that contain an attribute Color with the value Red. *

*

* Requires permission to access the ListThings action. *

* *

* You will not be charged for calling this API if an Access denied error is returned. You will also * not be charged if no attributes or pagination token was provided in request and no pagination token and no * results were returned. *

*
* * @param listThingsRequest * The input for the ListThings operation. * @return Result of the ListThings 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.ListThings */ @Override public ListThingsResponse listThings(ListThingsRequest listThingsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListThingsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThings"); return clientHandler .execute(new ClientExecutionParams().withOperationName("ListThings") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(listThingsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists your things. Use the attributeName and attributeValue parameters to filter your things. For * example, calling ListThings with attributeName=Color and attributeValue=Red retrieves all things in * the registry that contain an attribute Color with the value Red. *

*

* Requires permission to access the ListThings action. *

* *

* You will not be charged for calling this API if an Access denied error is returned. You will also * not be charged if no attributes or pagination token was provided in request and no pagination token and no * results were returned. *

*

*

* This is a variant of {@link #listThings(software.amazon.awssdk.services.iot.model.ListThingsRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsIterable responses = client.listThingsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingsIterable responses = client.listThingsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsIterable responses = client.listThingsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThings(software.amazon.awssdk.services.iot.model.ListThingsRequest)} operation. *

* * @param listThingsRequest * The input for the ListThings operation. * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListThings */ @Override public ListThingsIterable listThingsPaginator(ListThingsRequest listThingsRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListThingsIterable(this, applyPaginatorUserAgent(listThingsRequest)); } /** *

* Lists the things you have added to the given billing group. *

*

* Requires permission to access the ListThingsInBillingGroup action. *

* * @param listThingsInBillingGroupRequest * @return Result of the ListThingsInBillingGroup operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingsInBillingGroup */ @Override public ListThingsInBillingGroupResponse listThingsInBillingGroup( ListThingsInBillingGroupRequest listThingsInBillingGroupRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingsInBillingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingsInBillingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingsInBillingGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListThingsInBillingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingsInBillingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingsInBillingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the things you have added to the given billing group. *

*

* Requires permission to access the ListThingsInBillingGroup action. *

*
*

* This is a variant of * {@link #listThingsInBillingGroup(software.amazon.awssdk.services.iot.model.ListThingsInBillingGroupRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsInBillingGroupIterable responses = client.listThingsInBillingGroupPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingsInBillingGroupIterable responses = client
     *             .listThingsInBillingGroupPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingsInBillingGroupResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsInBillingGroupIterable responses = client.listThingsInBillingGroupPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingsInBillingGroup(software.amazon.awssdk.services.iot.model.ListThingsInBillingGroupRequest)} * operation. *

* * @param listThingsInBillingGroupRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingsInBillingGroup */ @Override public ListThingsInBillingGroupIterable listThingsInBillingGroupPaginator( ListThingsInBillingGroupRequest listThingsInBillingGroupRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListThingsInBillingGroupIterable(this, applyPaginatorUserAgent(listThingsInBillingGroupRequest)); } /** *

* Lists the things in the specified group. *

*

* Requires permission to access the ListThingsInThingGroup action. *

* * @param listThingsInThingGroupRequest * @return Result of the ListThingsInThingGroup operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingsInThingGroup */ @Override public ListThingsInThingGroupResponse listThingsInThingGroup(ListThingsInThingGroupRequest listThingsInThingGroupRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListThingsInThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listThingsInThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListThingsInThingGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListThingsInThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listThingsInThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListThingsInThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the things in the specified group. *

*

* Requires permission to access the ListThingsInThingGroup action. *

*
*

* This is a variant of * {@link #listThingsInThingGroup(software.amazon.awssdk.services.iot.model.ListThingsInThingGroupRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsInThingGroupIterable responses = client.listThingsInThingGroupPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListThingsInThingGroupIterable responses = client
     *             .listThingsInThingGroupPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListThingsInThingGroupResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListThingsInThingGroupIterable responses = client.listThingsInThingGroupPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listThingsInThingGroup(software.amazon.awssdk.services.iot.model.ListThingsInThingGroupRequest)} * operation. *

* * @param listThingsInThingGroupRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.ListThingsInThingGroup */ @Override public ListThingsInThingGroupIterable listThingsInThingGroupPaginator( ListThingsInThingGroupRequest listThingsInThingGroupRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { return new ListThingsInThingGroupIterable(this, applyPaginatorUserAgent(listThingsInThingGroupRequest)); } /** *

* Lists all the topic rule destinations in your Amazon Web Services account. *

*

* Requires permission to access the ListTopicRuleDestinations action. *

* * @param listTopicRuleDestinationsRequest * @return Result of the ListTopicRuleDestinations 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 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.ListTopicRuleDestinations */ @Override public ListTopicRuleDestinationsResponse listTopicRuleDestinations( ListTopicRuleDestinationsRequest listTopicRuleDestinationsRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTopicRuleDestinationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTopicRuleDestinationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTopicRuleDestinations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTopicRuleDestinations").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTopicRuleDestinationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTopicRuleDestinationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all the topic rule destinations in your Amazon Web Services account. *

*

* Requires permission to access the ListTopicRuleDestinations action. *

*
*

* This is a variant of * {@link #listTopicRuleDestinations(software.amazon.awssdk.services.iot.model.ListTopicRuleDestinationsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTopicRuleDestinationsIterable responses = client.listTopicRuleDestinationsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListTopicRuleDestinationsIterable responses = client
     *             .listTopicRuleDestinationsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListTopicRuleDestinationsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTopicRuleDestinationsIterable responses = client.listTopicRuleDestinationsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listTopicRuleDestinations(software.amazon.awssdk.services.iot.model.ListTopicRuleDestinationsRequest)} * operation. *

* * @param listTopicRuleDestinationsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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 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.ListTopicRuleDestinations */ @Override public ListTopicRuleDestinationsIterable listTopicRuleDestinationsPaginator( ListTopicRuleDestinationsRequest listTopicRuleDestinationsRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, AwsServiceException, SdkClientException, IotException { return new ListTopicRuleDestinationsIterable(this, applyPaginatorUserAgent(listTopicRuleDestinationsRequest)); } /** *

* Lists the rules for the specific topic. *

*

* Requires permission to access the ListTopicRules action. *

* * @param listTopicRulesRequest * The input for the ListTopicRules operation. * @return Result of the ListTopicRules 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 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.ListTopicRules */ @Override public ListTopicRulesResponse listTopicRules(ListTopicRulesRequest listTopicRulesRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListTopicRulesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTopicRulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTopicRules"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTopicRules").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTopicRulesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTopicRulesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the rules for the specific topic. *

*

* Requires permission to access the ListTopicRules action. *

*
*

* This is a variant of {@link #listTopicRules(software.amazon.awssdk.services.iot.model.ListTopicRulesRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTopicRulesIterable responses = client.listTopicRulesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListTopicRulesIterable responses = client.listTopicRulesPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListTopicRulesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListTopicRulesIterable responses = client.listTopicRulesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listTopicRules(software.amazon.awssdk.services.iot.model.ListTopicRulesRequest)} operation. *

* * @param listTopicRulesRequest * The input for the ListTopicRules operation. * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @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.ListTopicRules */ @Override public ListTopicRulesIterable listTopicRulesPaginator(ListTopicRulesRequest listTopicRulesRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListTopicRulesIterable(this, applyPaginatorUserAgent(listTopicRulesRequest)); } /** *

* Lists logging levels. *

*

* Requires permission to access the ListV2LoggingLevels action. *

* * @param listV2LoggingLevelsRequest * @return Result of the ListV2LoggingLevels operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws NotConfiguredException * The resource is not configured. * @throws InvalidRequestException * The request is not valid. * @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.ListV2LoggingLevels */ @Override public ListV2LoggingLevelsResponse listV2LoggingLevels(ListV2LoggingLevelsRequest listV2LoggingLevelsRequest) throws InternalException, NotConfiguredException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListV2LoggingLevelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listV2LoggingLevelsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListV2LoggingLevels"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListV2LoggingLevels").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listV2LoggingLevelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListV2LoggingLevelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists logging levels. *

*

* Requires permission to access the ListV2LoggingLevels action. *

*
*

* This is a variant of * {@link #listV2LoggingLevels(software.amazon.awssdk.services.iot.model.ListV2LoggingLevelsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListV2LoggingLevelsIterable responses = client.listV2LoggingLevelsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListV2LoggingLevelsIterable responses = client
     *             .listV2LoggingLevelsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListV2LoggingLevelsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListV2LoggingLevelsIterable responses = client.listV2LoggingLevelsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listV2LoggingLevels(software.amazon.awssdk.services.iot.model.ListV2LoggingLevelsRequest)} operation. *

* * @param listV2LoggingLevelsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalException * An unexpected error has occurred. * @throws NotConfiguredException * The resource is not configured. * @throws InvalidRequestException * The request is not valid. * @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.ListV2LoggingLevels */ @Override public ListV2LoggingLevelsIterable listV2LoggingLevelsPaginator(ListV2LoggingLevelsRequest listV2LoggingLevelsRequest) throws InternalException, NotConfiguredException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { return new ListV2LoggingLevelsIterable(this, applyPaginatorUserAgent(listV2LoggingLevelsRequest)); } /** *

* Lists the Device Defender security profile violations discovered during the given time period. You can use * filters to limit the results to those alerts issued for a particular security profile, behavior, or thing * (device). *

*

* Requires permission to access the ListViolationEvents action. *

* * @param listViolationEventsRequest * @return Result of the ListViolationEvents 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.ListViolationEvents */ @Override public ListViolationEventsResponse listViolationEvents(ListViolationEventsRequest listViolationEventsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListViolationEventsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listViolationEventsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListViolationEvents"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListViolationEvents").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listViolationEventsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListViolationEventsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the Device Defender security profile violations discovered during the given time period. You can use * filters to limit the results to those alerts issued for a particular security profile, behavior, or thing * (device). *

*

* Requires permission to access the ListViolationEvents action. *

*
*

* This is a variant of * {@link #listViolationEvents(software.amazon.awssdk.services.iot.model.ListViolationEventsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListViolationEventsIterable responses = client.listViolationEventsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.iot.paginators.ListViolationEventsIterable responses = client
     *             .listViolationEventsPaginator(request);
     *     for (software.amazon.awssdk.services.iot.model.ListViolationEventsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.iot.paginators.ListViolationEventsIterable responses = client.listViolationEventsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listViolationEvents(software.amazon.awssdk.services.iot.model.ListViolationEventsRequest)} operation. *

* * @param listViolationEventsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @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.ListViolationEvents */ @Override public ListViolationEventsIterable listViolationEventsPaginator(ListViolationEventsRequest listViolationEventsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { return new ListViolationEventsIterable(this, applyPaginatorUserAgent(listViolationEventsRequest)); } /** *

* Set a verification state and provide a description of that verification state on a violation (detect alarm). *

* * @param putVerificationStateOnViolationRequest * @return Result of the PutVerificationStateOnViolation 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.PutVerificationStateOnViolation */ @Override public PutVerificationStateOnViolationResponse putVerificationStateOnViolation( PutVerificationStateOnViolationRequest putVerificationStateOnViolationRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutVerificationStateOnViolationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, putVerificationStateOnViolationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutVerificationStateOnViolation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("PutVerificationStateOnViolation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putVerificationStateOnViolationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutVerificationStateOnViolationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Registers a CA certificate with Amazon Web Services IoT Core. There is no limit to the number of CA certificates * you can register in your Amazon Web Services account. You can register up to 10 CA certificates with the same * CA subject field per Amazon Web Services account. *

*

* Requires permission to access the RegisterCACertificate action. *

* * @param registerCaCertificateRequest * The input to the RegisterCACertificate operation. * @return Result of the RegisterCACertificate operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ResourceAlreadyExistsException * The resource already exists. * @throws RegistrationCodeValidationException * The registration code is invalid. * @throws InvalidRequestException * The request is not valid. * @throws CertificateValidationException * The certificate is invalid. * @throws ThrottlingException * The rate exceeds the limit. * @throws LimitExceededException * A limit has been exceeded. * @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.RegisterCACertificate */ @Override public RegisterCaCertificateResponse registerCACertificate(RegisterCaCertificateRequest registerCaCertificateRequest) throws ResourceNotFoundException, ResourceAlreadyExistsException, RegistrationCodeValidationException, InvalidRequestException, CertificateValidationException, ThrottlingException, LimitExceededException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RegisterCaCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, registerCaCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterCACertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RegisterCACertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(registerCaCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RegisterCaCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Registers a device certificate with IoT in the same certificate mode as the signing CA. If you have more than one CA certificate that has the same subject * field, you must specify the CA certificate that was used to sign the device certificate being registered. *

*

* Requires permission to access the RegisterCertificate action. *

* * @param registerCertificateRequest * The input to the RegisterCertificate operation. * @return Result of the RegisterCertificate operation returned by the service. * @throws ResourceAlreadyExistsException * The resource already exists. * @throws InvalidRequestException * The request is not valid. * @throws CertificateValidationException * The certificate is invalid. * @throws CertificateStateException * The certificate operation is not allowed. * @throws CertificateConflictException * Unable to verify the CA certificate used to sign the device certificate you are attempting to register. * This is happens when you have registered more than one CA certificate that has the same subject field and * public key. * @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.RegisterCertificate */ @Override public RegisterCertificateResponse registerCertificate(RegisterCertificateRequest registerCertificateRequest) throws ResourceAlreadyExistsException, InvalidRequestException, CertificateValidationException, CertificateStateException, CertificateConflictException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RegisterCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, registerCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterCertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RegisterCertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(registerCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RegisterCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Register a certificate that does not have a certificate authority (CA). For supported certificates, consult * Certificate signing algorithms supported by IoT. *

* * @param registerCertificateWithoutCaRequest * @return Result of the RegisterCertificateWithoutCA operation returned by the service. * @throws ResourceAlreadyExistsException * The resource already exists. * @throws InvalidRequestException * The request is not valid. * @throws CertificateStateException * The certificate operation is not allowed. * @throws CertificateValidationException * The certificate is invalid. * @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.RegisterCertificateWithoutCA */ @Override public RegisterCertificateWithoutCaResponse registerCertificateWithoutCA( RegisterCertificateWithoutCaRequest registerCertificateWithoutCaRequest) throws ResourceAlreadyExistsException, InvalidRequestException, CertificateStateException, CertificateValidationException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RegisterCertificateWithoutCaResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, registerCertificateWithoutCaRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterCertificateWithoutCA"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RegisterCertificateWithoutCA").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(registerCertificateWithoutCaRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RegisterCertificateWithoutCaRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provisions a thing in the device registry. RegisterThing calls other IoT control plane APIs. These calls might * exceed your account level IoT Throttling * Limits and cause throttle errors. Please contact Amazon * Web Services Customer Support to raise your throttling limits if necessary. *

*

* Requires permission to access the RegisterThing action. *

* * @param registerThingRequest * @return Result of the RegisterThing operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @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 ConflictingResourceUpdateException * A conflicting resource update exception. This exception is thrown when two pending updates cause a * conflict. * @throws ResourceRegistrationFailureException * The resource registration failed. * @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.RegisterThing */ @Override public RegisterThingResponse registerThing(RegisterThingRequest registerThingRequest) throws InternalFailureException, ServiceUnavailableException, InvalidRequestException, UnauthorizedException, ThrottlingException, ConflictingResourceUpdateException, ResourceRegistrationFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RegisterThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, registerThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterThing"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RegisterThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(registerThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RegisterThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Rejects a pending certificate transfer. After IoT rejects a certificate transfer, the certificate status changes * from PENDING_TRANSFER to INACTIVE. *

*

* To check for pending certificate transfers, call ListCertificates to enumerate your certificates. *

*

* This operation can only be called by the transfer destination. After it is called, the certificate will be * returned to the source's account in the INACTIVE state. *

*

* Requires permission to access the RejectCertificateTransfer action. *

* * @param rejectCertificateTransferRequest * The input for the RejectCertificateTransfer operation. * @return Result of the RejectCertificateTransfer 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.RejectCertificateTransfer */ @Override public RejectCertificateTransferResponse rejectCertificateTransfer( RejectCertificateTransferRequest rejectCertificateTransferRequest) 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, RejectCertificateTransferResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, rejectCertificateTransferRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RejectCertificateTransfer"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RejectCertificateTransfer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(rejectCertificateTransferRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RejectCertificateTransferRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes the given thing from the billing group. *

*

* Requires permission to access the RemoveThingFromBillingGroup action. *

* *

* This call is asynchronous. It might take several seconds for the detachment to propagate. *

*
* * @param removeThingFromBillingGroupRequest * @return Result of the RemoveThingFromBillingGroup 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.RemoveThingFromBillingGroup */ @Override public RemoveThingFromBillingGroupResponse removeThingFromBillingGroup( RemoveThingFromBillingGroupRequest removeThingFromBillingGroupRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RemoveThingFromBillingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeThingFromBillingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveThingFromBillingGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveThingFromBillingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(removeThingFromBillingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveThingFromBillingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Remove the specified thing from the specified group. *

*

* You must specify either a thingGroupArn or a thingGroupName to identify the thing group * and either a thingArn or a thingName to identify the thing to remove from the thing * group. *

*

* Requires permission to access the RemoveThingFromThingGroup action. *

* * @param removeThingFromThingGroupRequest * @return Result of the RemoveThingFromThingGroup 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.RemoveThingFromThingGroup */ @Override public RemoveThingFromThingGroupResponse removeThingFromThingGroup( RemoveThingFromThingGroupRequest removeThingFromThingGroupRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RemoveThingFromThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeThingFromThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveThingFromThingGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveThingFromThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(removeThingFromThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveThingFromThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Replaces the rule. You must specify all parameters for the new 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 ReplaceTopicRule action. *

* * @param replaceTopicRuleRequest * The input for the ReplaceTopicRule operation. * @return Result of the ReplaceTopicRule 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 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.ReplaceTopicRule */ @Override public ReplaceTopicRuleResponse replaceTopicRule(ReplaceTopicRuleRequest replaceTopicRuleRequest) throws SqlParseException, InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ReplaceTopicRuleResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, replaceTopicRuleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ReplaceTopicRule"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ReplaceTopicRule").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(replaceTopicRuleRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ReplaceTopicRuleRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* The query search index. *

*

* Requires permission to access the SearchIndex action. *

* * @param searchIndexRequest * @return Result of the SearchIndex operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidQueryException * The query 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.SearchIndex */ @Override public SearchIndexResponse searchIndex(SearchIndexRequest searchIndexRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SearchIndexResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, searchIndexRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SearchIndex"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SearchIndex").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(searchIndexRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SearchIndexRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Sets the default authorizer. This will be used if a websocket connection is made without specifying an * authorizer. *

*

* Requires permission to access the SetDefaultAuthorizer action. *

* * @param setDefaultAuthorizerRequest * @return Result of the SetDefaultAuthorizer 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 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.SetDefaultAuthorizer */ @Override public SetDefaultAuthorizerResponse setDefaultAuthorizer(SetDefaultAuthorizerRequest setDefaultAuthorizerRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceAlreadyExistsException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SetDefaultAuthorizerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, setDefaultAuthorizerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetDefaultAuthorizer"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SetDefaultAuthorizer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(setDefaultAuthorizerRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SetDefaultAuthorizerRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Sets the specified version of the specified policy as the policy's default (operative) version. This action * affects all certificates to which the policy is attached. To list the principals the policy is attached to, use * the ListPrincipalPolicies action. *

*

* Requires permission to access the SetDefaultPolicyVersion action. *

* * @param setDefaultPolicyVersionRequest * The input for the SetDefaultPolicyVersion operation. * @return Result of the SetDefaultPolicyVersion 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.SetDefaultPolicyVersion */ @Override public SetDefaultPolicyVersionResponse setDefaultPolicyVersion(SetDefaultPolicyVersionRequest setDefaultPolicyVersionRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SetDefaultPolicyVersionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, setDefaultPolicyVersionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetDefaultPolicyVersion"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("SetDefaultPolicyVersion").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(setDefaultPolicyVersionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SetDefaultPolicyVersionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Sets the logging options. *

*

* NOTE: use of this command is not recommended. Use SetV2LoggingOptions instead. *

*

* Requires permission to access the SetLoggingOptions action. *

* * @param setLoggingOptionsRequest * The input for the SetLoggingOptions operation. * @return Result of the SetLoggingOptions 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 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.SetLoggingOptions */ @Override public SetLoggingOptionsResponse setLoggingOptions(SetLoggingOptionsRequest setLoggingOptionsRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SetLoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, setLoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetLoggingOptions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SetLoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(setLoggingOptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SetLoggingOptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Sets the logging level. *

*

* Requires permission to access the SetV2LoggingLevel action. *

* * @param setV2LoggingLevelRequest * @return Result of the SetV2LoggingLevel operation returned by the service. * @throws InternalException * An unexpected error has occurred. * @throws NotConfiguredException * The resource is not configured. * @throws InvalidRequestException * The request is not valid. * @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.SetV2LoggingLevel */ @Override public SetV2LoggingLevelResponse setV2LoggingLevel(SetV2LoggingLevelRequest setV2LoggingLevelRequest) throws InternalException, NotConfiguredException, InvalidRequestException, ServiceUnavailableException, LimitExceededException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, SetV2LoggingLevelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, setV2LoggingLevelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetV2LoggingLevel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SetV2LoggingLevel").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(setV2LoggingLevelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SetV2LoggingLevelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Sets the logging options for the V2 logging service. *

*

* Requires permission to access the SetV2LoggingOptions action. *

* * @param setV2LoggingOptionsRequest * @return Result of the SetV2LoggingOptions 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 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.SetV2LoggingOptions */ @Override public SetV2LoggingOptionsResponse setV2LoggingOptions(SetV2LoggingOptionsRequest setV2LoggingOptionsRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, SetV2LoggingOptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, setV2LoggingOptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetV2LoggingOptions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("SetV2LoggingOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(setV2LoggingOptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new SetV2LoggingOptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts a task that applies a set of mitigation actions to the specified target. *

*

* Requires permission to access the StartAuditMitigationActionsTask action. *

* * @param startAuditMitigationActionsTaskRequest * @return Result of the StartAuditMitigationActionsTask operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws TaskAlreadyExistsException * This exception occurs if you attempt to start a task with the same task-id as an existing task but with a * different clientRequestToken. * @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.StartAuditMitigationActionsTask */ @Override public StartAuditMitigationActionsTaskResponse startAuditMitigationActionsTask( StartAuditMitigationActionsTaskRequest startAuditMitigationActionsTaskRequest) throws InvalidRequestException, TaskAlreadyExistsException, LimitExceededException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartAuditMitigationActionsTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startAuditMitigationActionsTaskRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartAuditMitigationActionsTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartAuditMitigationActionsTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startAuditMitigationActionsTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartAuditMitigationActionsTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts a Device Defender ML Detect mitigation actions task. *

*

* Requires permission to access the StartDetectMitigationActionsTask action. *

* * @param startDetectMitigationActionsTaskRequest * @return Result of the StartDetectMitigationActionsTask operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws TaskAlreadyExistsException * This exception occurs if you attempt to start a task with the same task-id as an existing task but with a * different clientRequestToken. * @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.StartDetectMitigationActionsTask */ @Override public StartDetectMitigationActionsTaskResponse startDetectMitigationActionsTask( StartDetectMitigationActionsTaskRequest startDetectMitigationActionsTaskRequest) throws InvalidRequestException, TaskAlreadyExistsException, LimitExceededException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartDetectMitigationActionsTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startDetectMitigationActionsTaskRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartDetectMitigationActionsTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartDetectMitigationActionsTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startDetectMitigationActionsTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartDetectMitigationActionsTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Starts an on-demand Device Defender audit. *

*

* Requires permission to access the StartOnDemandAuditTask action. *

* * @param startOnDemandAuditTaskRequest * @return Result of the StartOnDemandAuditTask 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 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.StartOnDemandAuditTask */ @Override public StartOnDemandAuditTaskResponse startOnDemandAuditTask(StartOnDemandAuditTaskRequest startOnDemandAuditTaskRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, LimitExceededException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartOnDemandAuditTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startOnDemandAuditTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartOnDemandAuditTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartOnDemandAuditTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startOnDemandAuditTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartOnDemandAuditTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a bulk thing provisioning task. *

*

* Requires permission to access the StartThingRegistrationTask action. *

* * @param startThingRegistrationTaskRequest * @return Result of the StartThingRegistrationTask 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 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.StartThingRegistrationTask */ @Override public StartThingRegistrationTaskResponse startThingRegistrationTask( StartThingRegistrationTaskRequest startThingRegistrationTaskRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartThingRegistrationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startThingRegistrationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartThingRegistrationTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartThingRegistrationTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startThingRegistrationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartThingRegistrationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Cancels a bulk thing provisioning task. *

*

* Requires permission to access the StopThingRegistrationTask action. *

* * @param stopThingRegistrationTaskRequest * @return Result of the StopThingRegistrationTask 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 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.StopThingRegistrationTask */ @Override public StopThingRegistrationTaskResponse stopThingRegistrationTask( StopThingRegistrationTaskRequest stopThingRegistrationTaskRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StopThingRegistrationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopThingRegistrationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopThingRegistrationTask"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StopThingRegistrationTask").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(stopThingRegistrationTaskRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StopThingRegistrationTaskRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource. *

*

* Requires permission to access the TagResource action. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @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.TagResource */ @Override public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, LimitExceededException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(tagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Tests if a specified principal is authorized to perform an IoT action on a specified resource. Use this to test * and debug the authorization behavior of devices that connect to the IoT device gateway. *

*

* Requires permission to access the TestAuthorization action. *

* * @param testAuthorizationRequest * @return Result of the TestAuthorization 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.TestAuthorization */ @Override public TestAuthorizationResponse testAuthorization(TestAuthorizationRequest testAuthorizationRequest) 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, TestAuthorizationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, testAuthorizationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TestAuthorization"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TestAuthorization").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(testAuthorizationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TestAuthorizationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Tests a custom authorization behavior by invoking a specified custom authorizer. Use this to test and debug the * custom authorization behavior of devices that connect to the IoT device gateway. *

*

* Requires permission to access the TestInvokeAuthorizer action. *

* * @param testInvokeAuthorizerRequest * @return Result of the TestInvokeAuthorizer 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 InvalidResponseException * The response is invalid. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IotException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IotClient.TestInvokeAuthorizer */ @Override public TestInvokeAuthorizerResponse testInvokeAuthorizer(TestInvokeAuthorizerRequest testInvokeAuthorizerRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, InvalidResponseException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, TestInvokeAuthorizerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, testInvokeAuthorizerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TestInvokeAuthorizer"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TestInvokeAuthorizer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(testInvokeAuthorizerRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TestInvokeAuthorizerRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Transfers the specified certificate to the specified Amazon Web Services account. *

*

* Requires permission to access the TransferCertificate action. *

*

* You can cancel the transfer until it is acknowledged by the recipient. *

*

* No notification is sent to the transfer destination's account. It is up to the caller to notify the transfer * target. *

*

* The certificate being transferred must not be in the ACTIVE state. You can use the UpdateCertificate * action to deactivate it. *

*

* The certificate must not have any policies attached to it. You can use the DetachPolicy action to detach * them. *

* * @param transferCertificateRequest * The input for the TransferCertificate operation. * @return Result of the TransferCertificate operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws CertificateStateException * The certificate operation is not allowed. * @throws TransferConflictException * You can't transfer the certificate because authorization policies are still attached. * @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.TransferCertificate */ @Override public TransferCertificateResponse transferCertificate(TransferCertificateRequest transferCertificateRequest) throws InvalidRequestException, ResourceNotFoundException, CertificateStateException, TransferConflictException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, TransferCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, transferCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TransferCertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TransferCertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(transferCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TransferCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes the given tags (metadata) from the resource. *

*

* Requires permission to access the UntagResource action. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.UntagResource */ @Override public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InvalidRequestException, InternalFailureException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UntagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(untagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Configures or reconfigures the Device Defender audit settings for this account. Settings include how audit * notifications are sent and which audit checks are enabled or disabled. *

*

* Requires permission to access the UpdateAccountAuditConfiguration action. *

* * @param updateAccountAuditConfigurationRequest * @return Result of the UpdateAccountAuditConfiguration 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.UpdateAccountAuditConfiguration */ @Override public UpdateAccountAuditConfigurationResponse updateAccountAuditConfiguration( UpdateAccountAuditConfigurationRequest updateAccountAuditConfigurationRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateAccountAuditConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAccountAuditConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAccountAuditConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAccountAuditConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateAccountAuditConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateAccountAuditConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a Device Defender audit suppression. *

* * @param updateAuditSuppressionRequest * @return Result of the UpdateAuditSuppression 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.UpdateAuditSuppression */ @Override public UpdateAuditSuppressionResponse updateAuditSuppression(UpdateAuditSuppressionRequest updateAuditSuppressionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateAuditSuppressionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAuditSuppressionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAuditSuppression"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateAuditSuppression").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateAuditSuppressionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateAuditSuppressionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates an authorizer. *

*

* Requires permission to access the UpdateAuthorizer action. *

* * @param updateAuthorizerRequest * @return Result of the UpdateAuthorizer operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @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.UpdateAuthorizer */ @Override public UpdateAuthorizerResponse updateAuthorizer(UpdateAuthorizerRequest updateAuthorizerRequest) throws ResourceNotFoundException, InvalidRequestException, LimitExceededException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateAuthorizerResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateAuthorizerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAuthorizer"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateAuthorizer").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateAuthorizerRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateAuthorizerRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates information about the billing group. *

*

* Requires permission to access the UpdateBillingGroup action. *

* * @param updateBillingGroupRequest * @return Result of the UpdateBillingGroup 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 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.UpdateBillingGroup */ @Override public UpdateBillingGroupResponse updateBillingGroup(UpdateBillingGroupRequest updateBillingGroupRequest) throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateBillingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateBillingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateBillingGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateBillingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateBillingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateBillingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a registered CA certificate. *

*

* Requires permission to access the UpdateCACertificate action. *

* * @param updateCaCertificateRequest * The input to the UpdateCACertificate operation. * @return Result of the UpdateCACertificate 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.UpdateCACertificate */ @Override public UpdateCaCertificateResponse updateCACertificate(UpdateCaCertificateRequest updateCaCertificateRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateCaCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateCaCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCACertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateCACertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateCaCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateCaCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the status of the specified certificate. This operation is idempotent. *

*

* Requires permission to access the UpdateCertificate action. *

*

* Certificates must be in the ACTIVE state to authenticate devices that use a certificate to connect to IoT. *

*

* Within a few minutes of updating a certificate from the ACTIVE state to any other state, IoT disconnects all * devices that used that certificate to connect. Devices cannot use a certificate that is not in the ACTIVE state * to reconnect. *

* * @param updateCertificateRequest * The input for the UpdateCertificate operation. * @return Result of the UpdateCertificate operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws CertificateStateException * The certificate operation is not allowed. * @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.UpdateCertificate */ @Override public UpdateCertificateResponse updateCertificate(UpdateCertificateRequest updateCertificateRequest) throws ResourceNotFoundException, CertificateStateException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCertificate"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateCertificate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateCertificateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateCertificateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a Device Defender detect custom metric. *

*

* Requires permission to access the UpdateCustomMetric action. *

* * @param updateCustomMetricRequest * @return Result of the UpdateCustomMetric 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.UpdateCustomMetric */ @Override public UpdateCustomMetricResponse updateCustomMetric(UpdateCustomMetricRequest updateCustomMetricRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateCustomMetricResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateCustomMetricRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCustomMetric"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateCustomMetric").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateCustomMetricRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateCustomMetricRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can * delete it and recreate it). *

*

* Requires permission to access the UpdateDimension action. *

* * @param updateDimensionRequest * @return Result of the UpdateDimension operation returned by the service. * @throws InternalFailureException * An unexpected error has occurred. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws ThrottlingException * The rate exceeds the limit. * @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.UpdateDimension */ @Override public UpdateDimensionResponse updateDimension(UpdateDimensionRequest updateDimensionRequest) throws InternalFailureException, InvalidRequestException, ResourceNotFoundException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDimensionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDimensionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDimension"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateDimension").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDimensionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateDimensionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates values stored in the domain configuration. Domain configurations for default endpoints can't be updated. *

*

* Requires permission to access the UpdateDomainConfiguration action. *

* * @param updateDomainConfigurationRequest * @return Result of the UpdateDomainConfiguration operation returned by the service. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws CertificateValidationException * The certificate is invalid. * @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.UpdateDomainConfiguration */ @Override public UpdateDomainConfigurationResponse updateDomainConfiguration( UpdateDomainConfigurationRequest updateDomainConfigurationRequest) throws ResourceNotFoundException, CertificateValidationException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateDomainConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDomainConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDomainConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateDomainConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDomainConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateDomainConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a dynamic thing group. *

*

* Requires permission to access the UpdateDynamicThingGroup action. *

* * @param updateDynamicThingGroupRequest * @return Result of the UpdateDynamicThingGroup 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 ResourceNotFoundException * The specified resource does not exist. * @throws InvalidQueryException * The query is invalid. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws IotException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample IotClient.UpdateDynamicThingGroup */ @Override public UpdateDynamicThingGroupResponse updateDynamicThingGroup(UpdateDynamicThingGroupRequest updateDynamicThingGroupRequest) throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateDynamicThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDynamicThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDynamicThingGroup"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateDynamicThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDynamicThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateDynamicThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the event configurations. *

*

* Requires permission to access the UpdateEventConfigurations action. *

* * @param updateEventConfigurationsRequest * @return Result of the UpdateEventConfigurations operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws InternalFailureException * An unexpected error has occurred. * @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.UpdateEventConfigurations */ @Override public UpdateEventConfigurationsResponse updateEventConfigurations( UpdateEventConfigurationsRequest updateEventConfigurationsRequest) throws InvalidRequestException, InternalFailureException, ThrottlingException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateEventConfigurationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateEventConfigurationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateEventConfigurations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateEventConfigurations").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateEventConfigurationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateEventConfigurationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the data for a fleet metric. *

*

* Requires permission to access the UpdateFleetMetric action. *

* * @param updateFleetMetricRequest * @return Result of the UpdateFleetMetric operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ThrottlingException * The rate exceeds the limit. * @throws UnauthorizedException * You are not authorized to perform this operation. * @throws ServiceUnavailableException * The service is temporarily unavailable. * @throws InternalFailureException * An unexpected error has occurred. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws InvalidQueryException * The query is invalid. * @throws InvalidAggregationException * The aggregation is invalid. * @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 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.UpdateFleetMetric */ @Override public UpdateFleetMetricResponse updateFleetMetric(UpdateFleetMetricRequest updateFleetMetricRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, InvalidQueryException, InvalidAggregationException, VersionConflictException, IndexNotReadyException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateFleetMetricResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateFleetMetricRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateFleetMetric"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateFleetMetric").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateFleetMetricRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateFleetMetricRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the search configuration. *

*

* Requires permission to access the UpdateIndexingConfiguration action. *

* * @param updateIndexingConfigurationRequest * @return Result of the UpdateIndexingConfiguration 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.UpdateIndexingConfiguration */ @Override public UpdateIndexingConfigurationResponse updateIndexingConfiguration( UpdateIndexingConfigurationRequest updateIndexingConfigurationRequest) throws InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateIndexingConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateIndexingConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateIndexingConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateIndexingConfiguration").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateIndexingConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateIndexingConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates supported fields of the specified job. *

*

* Requires permission to access the UpdateJob action. *

* * @param updateJobRequest * @return Result of the UpdateJob 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 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.UpdateJob */ @Override public UpdateJobResponse updateJob(UpdateJobRequest updateJobRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateJob"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateJob").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateJobRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new UpdateJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the definition for the specified mitigation action. *

*

* Requires permission to access the UpdateMitigationAction action. *

* * @param updateMitigationActionRequest * @return Result of the UpdateMitigationAction 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.UpdateMitigationAction */ @Override public UpdateMitigationActionResponse updateMitigationAction(UpdateMitigationActionRequest updateMitigationActionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateMitigationActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateMitigationActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateMitigationAction"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateMitigationAction").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateMitigationActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateMitigationActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a provisioning template. *

*

* Requires permission to access the UpdateProvisioningTemplate action. *

* * @param updateProvisioningTemplateRequest * @return Result of the UpdateProvisioningTemplate 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 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.UpdateProvisioningTemplate */ @Override public UpdateProvisioningTemplateResponse updateProvisioningTemplate( UpdateProvisioningTemplateRequest updateProvisioningTemplateRequest) throws InternalFailureException, InvalidRequestException, ResourceNotFoundException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateProvisioningTemplateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateProvisioningTemplateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateProvisioningTemplate"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateProvisioningTemplate").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateProvisioningTemplateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateProvisioningTemplateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a role alias. *

*

* Requires permission to access the UpdateRoleAlias action. *

* * @param updateRoleAliasRequest * @return Result of the UpdateRoleAlias 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.UpdateRoleAlias */ @Override public UpdateRoleAliasResponse updateRoleAlias(UpdateRoleAliasRequest updateRoleAliasRequest) throws ResourceNotFoundException, InvalidRequestException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateRoleAliasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoleAliasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoleAlias"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateRoleAlias").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateRoleAliasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateRoleAliasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a scheduled audit, including which checks are performed and how often the audit takes place. *

*

* Requires permission to access the UpdateScheduledAudit action. *

* * @param updateScheduledAuditRequest * @return Result of the UpdateScheduledAudit 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.UpdateScheduledAudit */ @Override public UpdateScheduledAuditResponse updateScheduledAudit(UpdateScheduledAuditRequest updateScheduledAuditRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateScheduledAuditResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateScheduledAuditRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateScheduledAudit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateScheduledAudit").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateScheduledAuditRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateScheduledAuditRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a Device Defender security profile. *

*

* Requires permission to access the UpdateSecurityProfile action. *

* * @param updateSecurityProfileRequest * @return Result of the UpdateSecurityProfile operation returned by the service. * @throws InvalidRequestException * The request is not valid. * @throws ResourceNotFoundException * The specified resource does not exist. * @throws VersionConflictException * An exception thrown when the version of an entity specified with the expectedVersion * parameter does not match the latest version in the system. * @throws 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.UpdateSecurityProfile */ @Override public UpdateSecurityProfileResponse updateSecurityProfile(UpdateSecurityProfileRequest updateSecurityProfileRequest) throws InvalidRequestException, ResourceNotFoundException, VersionConflictException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSecurityProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSecurityProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSecurityProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateSecurityProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateSecurityProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateSecurityProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates an existing stream. The stream version will be incremented by one. *

*

* Requires permission to access the UpdateStream action. *

* * @param updateStreamRequest * @return Result of the UpdateStream 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.UpdateStream */ @Override public UpdateStreamResponse updateStream(UpdateStreamRequest updateStreamRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateStreamResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateStreamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateStream"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateStream").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateStreamRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateStreamRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the data for a thing. *

*

* Requires permission to access the UpdateThing action. *

* * @param updateThingRequest * The input for the UpdateThing operation. * @return Result of the UpdateThing 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 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.UpdateThing */ @Override public UpdateThingResponse updateThing(UpdateThingRequest updateThingRequest) throws InvalidRequestException, VersionConflictException, ThrottlingException, UnauthorizedException, ServiceUnavailableException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateThing"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update a thing group. *

*

* Requires permission to access the UpdateThingGroup action. *

* * @param updateThingGroupRequest * @return Result of the UpdateThingGroup 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 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.UpdateThingGroup */ @Override public UpdateThingGroupResponse updateThingGroup(UpdateThingGroupRequest updateThingGroupRequest) throws InvalidRequestException, VersionConflictException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateThingGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateThingGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateThingGroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateThingGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateThingGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateThingGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates the groups to which the thing belongs. *

*

* Requires permission to access the UpdateThingGroupsForThing action. *

* * @param updateThingGroupsForThingRequest * @return Result of the UpdateThingGroupsForThing 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.UpdateThingGroupsForThing */ @Override public UpdateThingGroupsForThingResponse updateThingGroupsForThing( UpdateThingGroupsForThingRequest updateThingGroupsForThingRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, ResourceNotFoundException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateThingGroupsForThingResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateThingGroupsForThingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateThingGroupsForThing"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateThingGroupsForThing").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateThingGroupsForThingRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateThingGroupsForThingRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a topic rule destination. You use this to change the status, endpoint URL, or confirmation URL of the * destination. *

*

* Requires permission to access the UpdateTopicRuleDestination action. *

* * @param updateTopicRuleDestinationRequest * @return Result of the UpdateTopicRuleDestination 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.UpdateTopicRuleDestination */ @Override public UpdateTopicRuleDestinationResponse updateTopicRuleDestination( UpdateTopicRuleDestinationRequest updateTopicRuleDestinationRequest) throws InternalException, InvalidRequestException, ServiceUnavailableException, UnauthorizedException, ConflictingResourceUpdateException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateTopicRuleDestinationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTopicRuleDestinationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTopicRuleDestination"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateTopicRuleDestination").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateTopicRuleDestinationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateTopicRuleDestinationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Validates a Device Defender security profile behaviors specification. *

*

* Requires permission to access the ValidateSecurityProfileBehaviors action. *

* * @param validateSecurityProfileBehaviorsRequest * @return Result of the ValidateSecurityProfileBehaviors 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.ValidateSecurityProfileBehaviors */ @Override public ValidateSecurityProfileBehaviorsResponse validateSecurityProfileBehaviors( ValidateSecurityProfileBehaviorsRequest validateSecurityProfileBehaviorsRequest) throws InvalidRequestException, ThrottlingException, InternalFailureException, AwsServiceException, SdkClientException, IotException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ValidateSecurityProfileBehaviorsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, validateSecurityProfileBehaviorsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "IoT"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ValidateSecurityProfileBehaviors"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ValidateSecurityProfileBehaviors").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(validateSecurityProfileBehaviorsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ValidateSecurityProfileBehaviorsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(IotException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("InternalFailureException") .exceptionBuilderSupplier(InternalFailureException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerException") .exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(410).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TransferAlreadyCompletedException") .exceptionBuilderSupplier(TransferAlreadyCompletedException::builder).httpStatusCode(410).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NotConfiguredException") .exceptionBuilderSupplier(NotConfiguredException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("MalformedPolicyException") .exceptionBuilderSupplier(MalformedPolicyException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidQueryException") .exceptionBuilderSupplier(InvalidQueryException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidStateTransitionException") .exceptionBuilderSupplier(InvalidStateTransitionException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceRegistrationFailureException") .exceptionBuilderSupplier(ResourceRegistrationFailureException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DeleteConflictException") .exceptionBuilderSupplier(DeleteConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRequestException") .exceptionBuilderSupplier(InvalidRequestException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CertificateConflictException") .exceptionBuilderSupplier(CertificateConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("RegistrationCodeValidationException") .exceptionBuilderSupplier(RegistrationCodeValidationException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidResponseException") .exceptionBuilderSupplier(InvalidResponseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidAggregationException") .exceptionBuilderSupplier(InvalidAggregationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SqlParseException") .exceptionBuilderSupplier(SqlParseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictingResourceUpdateException") .exceptionBuilderSupplier(ConflictingResourceUpdateException::builder).httpStatusCode(409) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceAlreadyExistsException") .exceptionBuilderSupplier(ResourceAlreadyExistsException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalException") .exceptionBuilderSupplier(InternalException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VersionsLimitExceededException") .exceptionBuilderSupplier(VersionsLimitExceededException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TransferConflictException") .exceptionBuilderSupplier(TransferConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IndexNotReadyException") .exceptionBuilderSupplier(IndexNotReadyException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnauthorizedException") .exceptionBuilderSupplier(UnauthorizedException::builder).httpStatusCode(401).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CertificateStateException") .exceptionBuilderSupplier(CertificateStateException::builder).httpStatusCode(406).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("VersionConflictException") .exceptionBuilderSupplier(VersionConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TaskAlreadyExistsException") .exceptionBuilderSupplier(TaskAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceUnavailableException") .exceptionBuilderSupplier(ServiceUnavailableException::builder).httpStatusCode(503).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CertificateValidationException") .exceptionBuilderSupplier(CertificateValidationException::builder).httpStatusCode(400).build()); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy