IoTClient
Auto-generated documentation for IoT type annotations stubs module mypy-boto3-iot.
IoTClient
Type annotations and code completion for boto3.client("iot")
.
boto3 documentation
from boto3.session import Session
from mypy_boto3_iot.client import IoTClient
def get_iot_client() -> IoTClient:
return Session().client("iot")
Exceptions
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("iot").exceptions
structure.
client = boto3.client("iot")
try:
do_something(client)
except (
client.CertificateConflictException,
client.CertificateStateException,
client.CertificateValidationException,
client.ClientError,
client.ConflictException,
client.ConflictingResourceUpdateException,
client.DeleteConflictException,
client.IndexNotReadyException,
client.InternalException,
client.InternalFailureException,
client.InternalServerException,
client.InvalidAggregationException,
client.InvalidQueryException,
client.InvalidRequestException,
client.InvalidResponseException,
client.InvalidStateTransitionException,
client.LimitExceededException,
client.MalformedPolicyException,
client.NotConfiguredException,
client.RegistrationCodeValidationException,
client.ResourceAlreadyExistsException,
client.ResourceNotFoundException,
client.ResourceRegistrationFailureException,
client.ServiceUnavailableException,
client.SqlParseException,
client.TaskAlreadyExistsException,
client.ThrottlingException,
client.TransferAlreadyCompletedException,
client.TransferConflictException,
client.UnauthorizedException,
client.VersionConflictException,
client.VersionsLimitExceededException,
) as e:
print(e)
from mypy_boto3_iot.client import Exceptions
def handle_error(exc: Exceptions.CertificateConflictException) -> None:
...
Methods
accept_certificate_transfer
Accepts a pending certificate transfer.
Type annotations and code completion for boto3.client("iot").accept_certificate_transfer
method.
boto3 documentation
def accept_certificate_transfer(
self,
*,
certificateId: str,
setAsActive: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: AcceptCertificateTransferRequestRequestTypeDef = { # (1)
"certificateId": ...,
}
parent.accept_certificate_transfer(**kwargs)
add_thing_to_billing_group
Adds a thing to a billing group.
Type annotations and code completion for boto3.client("iot").add_thing_to_billing_group
method.
boto3 documentation
def add_thing_to_billing_group(
self,
*,
billingGroupName: str = ...,
billingGroupArn: str = ...,
thingName: str = ...,
thingArn: str = ...,
) -> Dict[str, Any]:
...
kwargs: AddThingToBillingGroupRequestRequestTypeDef = { # (1)
"billingGroupName": ...,
}
parent.add_thing_to_billing_group(**kwargs)
add_thing_to_thing_group
Adds a thing to a thing group.
Type annotations and code completion for boto3.client("iot").add_thing_to_thing_group
method.
boto3 documentation
def add_thing_to_thing_group(
self,
*,
thingGroupName: str = ...,
thingGroupArn: str = ...,
thingName: str = ...,
thingArn: str = ...,
overrideDynamicGroups: bool = ...,
) -> Dict[str, Any]:
...
kwargs: AddThingToThingGroupRequestRequestTypeDef = { # (1)
"thingGroupName": ...,
}
parent.add_thing_to_thing_group(**kwargs)
associate_targets_with_job
Associates a group with a continuous job.
Type annotations and code completion for boto3.client("iot").associate_targets_with_job
method.
boto3 documentation
def associate_targets_with_job(
self,
*,
targets: Sequence[str],
jobId: str,
comment: str = ...,
namespaceId: str = ...,
) -> AssociateTargetsWithJobResponseTypeDef: # (1)
...
kwargs: AssociateTargetsWithJobRequestRequestTypeDef = { # (1)
"targets": ...,
"jobId": ...,
}
parent.associate_targets_with_job(**kwargs)
attach_policy
Attaches the specified policy to the specified principal (certificate or other credential).
Type annotations and code completion for boto3.client("iot").attach_policy
method.
boto3 documentation
def attach_policy(
self,
*,
policyName: str,
target: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: AttachPolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
"target": ...,
}
parent.attach_policy(**kwargs)
attach_principal_policy
Attaches the specified policy to the specified principal (certificate or other credential).
Type annotations and code completion for boto3.client("iot").attach_principal_policy
method.
boto3 documentation
def attach_principal_policy(
self,
*,
policyName: str,
principal: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: AttachPrincipalPolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
"principal": ...,
}
parent.attach_principal_policy(**kwargs)
attach_security_profile
Associates a Device Defender security profile with a thing group or this account.
Type annotations and code completion for boto3.client("iot").attach_security_profile
method.
boto3 documentation
def attach_security_profile(
self,
*,
securityProfileName: str,
securityProfileTargetArn: str,
) -> Dict[str, Any]:
...
kwargs: AttachSecurityProfileRequestRequestTypeDef = { # (1)
"securityProfileName": ...,
"securityProfileTargetArn": ...,
}
parent.attach_security_profile(**kwargs)
attach_thing_principal
Attaches the specified principal to the specified thing.
Type annotations and code completion for boto3.client("iot").attach_thing_principal
method.
boto3 documentation
def attach_thing_principal(
self,
*,
thingName: str,
principal: str,
) -> Dict[str, Any]:
...
kwargs: AttachThingPrincipalRequestRequestTypeDef = { # (1)
"thingName": ...,
"principal": ...,
}
parent.attach_thing_principal(**kwargs)
can_paginate
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("iot").can_paginate
method.
boto3 documentation
cancel_audit_mitigation_actions_task
Cancels a mitigation action task that is in progress.
Type annotations and code completion for boto3.client("iot").cancel_audit_mitigation_actions_task
method.
boto3 documentation
def cancel_audit_mitigation_actions_task(
self,
*,
taskId: str,
) -> Dict[str, Any]:
...
kwargs: CancelAuditMitigationActionsTaskRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.cancel_audit_mitigation_actions_task(**kwargs)
cancel_audit_task
Cancels an audit that is in progress.
Type annotations and code completion for boto3.client("iot").cancel_audit_task
method.
boto3 documentation
kwargs: CancelAuditTaskRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.cancel_audit_task(**kwargs)
cancel_certificate_transfer
Cancels a pending transfer for the specified certificate.
Type annotations and code completion for boto3.client("iot").cancel_certificate_transfer
method.
boto3 documentation
def cancel_certificate_transfer(
self,
*,
certificateId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CancelCertificateTransferRequestRequestTypeDef = { # (1)
"certificateId": ...,
}
parent.cancel_certificate_transfer(**kwargs)
cancel_detect_mitigation_actions_task
Cancels a Device Defender ML Detect mitigation action.
Type annotations and code completion for boto3.client("iot").cancel_detect_mitigation_actions_task
method.
boto3 documentation
def cancel_detect_mitigation_actions_task(
self,
*,
taskId: str,
) -> Dict[str, Any]:
...
kwargs: CancelDetectMitigationActionsTaskRequestRequestTypeDef = { # (1)
"taskId": ...,
}
parent.cancel_detect_mitigation_actions_task(**kwargs)
cancel_job
Cancels a job.
Type annotations and code completion for boto3.client("iot").cancel_job
method.
boto3 documentation
def cancel_job(
self,
*,
jobId: str,
reasonCode: str = ...,
comment: str = ...,
force: bool = ...,
) -> CancelJobResponseTypeDef: # (1)
...
kwargs: CancelJobRequestRequestTypeDef = { # (1)
"jobId": ...,
}
parent.cancel_job(**kwargs)
cancel_job_execution
Cancels the execution of a job for a given thing.
Type annotations and code completion for boto3.client("iot").cancel_job_execution
method.
boto3 documentation
def cancel_job_execution(
self,
*,
jobId: str,
thingName: str,
force: bool = ...,
expectedVersion: int = ...,
statusDetails: Mapping[str, str] = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: CancelJobExecutionRequestRequestTypeDef = { # (1)
"jobId": ...,
"thingName": ...,
}
parent.cancel_job_execution(**kwargs)
clear_default_authorizer
Clears the default authorizer.
Type annotations and code completion for boto3.client("iot").clear_default_authorizer
method.
boto3 documentation
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("iot").close
method.
boto3 documentation
confirm_topic_rule_destination
Confirms a topic rule destination.
Type annotations and code completion for boto3.client("iot").confirm_topic_rule_destination
method.
boto3 documentation
def confirm_topic_rule_destination(
self,
*,
confirmationToken: str,
) -> Dict[str, Any]:
...
kwargs: ConfirmTopicRuleDestinationRequestRequestTypeDef = { # (1)
"confirmationToken": ...,
}
parent.confirm_topic_rule_destination(**kwargs)
create_audit_suppression
Creates a Device Defender audit suppression.
Type annotations and code completion for boto3.client("iot").create_audit_suppression
method.
boto3 documentation
def create_audit_suppression(
self,
*,
checkName: str,
resourceIdentifier: ResourceIdentifierTypeDef, # (1)
clientRequestToken: str,
expirationDate: Union[datetime, str] = ...,
suppressIndefinitely: bool = ...,
description: str = ...,
) -> Dict[str, Any]:
...
kwargs: CreateAuditSuppressionRequestRequestTypeDef = { # (1)
"checkName": ...,
"resourceIdentifier": ...,
"clientRequestToken": ...,
}
parent.create_audit_suppression(**kwargs)
create_authorizer
Creates an authorizer.
Type annotations and code completion for boto3.client("iot").create_authorizer
method.
boto3 documentation
def create_authorizer(
self,
*,
authorizerName: str,
authorizerFunctionArn: str,
tokenKeyName: str = ...,
tokenSigningPublicKeys: Mapping[str, str] = ...,
status: AuthorizerStatusType = ..., # (1)
tags: Sequence[TagTypeDef] = ..., # (2)
signingDisabled: bool = ...,
enableCachingForHttp: bool = ...,
) -> CreateAuthorizerResponseTypeDef: # (3)
...
kwargs: CreateAuthorizerRequestRequestTypeDef = { # (1)
"authorizerName": ...,
"authorizerFunctionArn": ...,
}
parent.create_authorizer(**kwargs)
create_billing_group
Creates a billing group.
Type annotations and code completion for boto3.client("iot").create_billing_group
method.
boto3 documentation
def create_billing_group(
self,
*,
billingGroupName: str,
billingGroupProperties: BillingGroupPropertiesTypeDef = ..., # (1)
tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateBillingGroupResponseTypeDef: # (3)
...
kwargs: CreateBillingGroupRequestRequestTypeDef = { # (1)
"billingGroupName": ...,
}
parent.create_billing_group(**kwargs)
create_certificate_from_csr
Creates an X.509 certificate using the specified certificate signing request.
Type annotations and code completion for boto3.client("iot").create_certificate_from_csr
method.
boto3 documentation
def create_certificate_from_csr(
self,
*,
certificateSigningRequest: str,
setAsActive: bool = ...,
) -> CreateCertificateFromCsrResponseTypeDef: # (1)
...
kwargs: CreateCertificateFromCsrRequestRequestTypeDef = { # (1)
"certificateSigningRequest": ...,
}
parent.create_certificate_from_csr(**kwargs)
create_custom_metric
Use this API to define a Custom Metric published by your devices to Device Defender.
Type annotations and code completion for boto3.client("iot").create_custom_metric
method.
boto3 documentation
def create_custom_metric(
self,
*,
metricName: str,
metricType: CustomMetricTypeType, # (1)
clientRequestToken: str,
displayName: str = ...,
tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateCustomMetricResponseTypeDef: # (3)
...
kwargs: CreateCustomMetricRequestRequestTypeDef = { # (1)
"metricName": ...,
"metricType": ...,
"clientRequestToken": ...,
}
parent.create_custom_metric(**kwargs)
create_dimension
Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender.
Type annotations and code completion for boto3.client("iot").create_dimension
method.
boto3 documentation
def create_dimension(
self,
*,
name: str,
type: DimensionTypeType, # (1)
stringValues: Sequence[str],
clientRequestToken: str,
tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateDimensionResponseTypeDef: # (3)
...
kwargs: CreateDimensionRequestRequestTypeDef = { # (1)
"name": ...,
"type": ...,
"stringValues": ...,
"clientRequestToken": ...,
}
parent.create_dimension(**kwargs)
create_domain_configuration
Creates a domain configuration.
Type annotations and code completion for boto3.client("iot").create_domain_configuration
method.
boto3 documentation
def create_domain_configuration(
self,
*,
domainConfigurationName: str,
domainName: str = ...,
serverCertificateArns: Sequence[str] = ...,
validationCertificateArn: str = ...,
authorizerConfig: AuthorizerConfigTypeDef = ..., # (1)
serviceType: ServiceTypeType = ..., # (2)
tags: Sequence[TagTypeDef] = ..., # (3)
) -> CreateDomainConfigurationResponseTypeDef: # (4)
...
- See AuthorizerConfigTypeDef
- See ServiceTypeType
- See TagTypeDef
- See CreateDomainConfigurationResponseTypeDef
kwargs: CreateDomainConfigurationRequestRequestTypeDef = { # (1)
"domainConfigurationName": ...,
}
parent.create_domain_configuration(**kwargs)
create_dynamic_thing_group
Creates a dynamic thing group.
Type annotations and code completion for boto3.client("iot").create_dynamic_thing_group
method.
boto3 documentation
def create_dynamic_thing_group(
self,
*,
thingGroupName: str,
queryString: str,
thingGroupProperties: ThingGroupPropertiesTypeDef = ..., # (1)
indexName: str = ...,
queryVersion: str = ...,
tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateDynamicThingGroupResponseTypeDef: # (3)
...
kwargs: CreateDynamicThingGroupRequestRequestTypeDef = { # (1)
"thingGroupName": ...,
"queryString": ...,
}
parent.create_dynamic_thing_group(**kwargs)
create_fleet_metric
Creates a fleet metric.
Type annotations and code completion for boto3.client("iot").create_fleet_metric
method.
boto3 documentation
def create_fleet_metric(
self,
*,
metricName: str,
queryString: str,
aggregationType: AggregationTypeTypeDef, # (1)
period: int,
aggregationField: str,
description: str = ...,
queryVersion: str = ...,
indexName: str = ...,
unit: FleetMetricUnitType = ..., # (2)
tags: Sequence[TagTypeDef] = ..., # (3)
) -> CreateFleetMetricResponseTypeDef: # (4)
...
- See AggregationTypeTypeDef
- See FleetMetricUnitType
- See TagTypeDef
- See CreateFleetMetricResponseTypeDef
kwargs: CreateFleetMetricRequestRequestTypeDef = { # (1)
"metricName": ...,
"queryString": ...,
"aggregationType": ...,
"period": ...,
"aggregationField": ...,
}
parent.create_fleet_metric(**kwargs)
create_job
Creates a job.
Type annotations and code completion for boto3.client("iot").create_job
method.
boto3 documentation
def create_job(
self,
*,
jobId: str,
targets: Sequence[str],
documentSource: str = ...,
document: str = ...,
description: str = ...,
presignedUrlConfig: PresignedUrlConfigTypeDef = ..., # (1)
targetSelection: TargetSelectionType = ..., # (2)
jobExecutionsRolloutConfig: JobExecutionsRolloutConfigTypeDef = ..., # (3)
abortConfig: AbortConfigTypeDef = ..., # (4)
timeoutConfig: TimeoutConfigTypeDef = ..., # (5)
tags: Sequence[TagTypeDef] = ..., # (6)
namespaceId: str = ...,
jobTemplateArn: str = ...,
jobExecutionsRetryConfig: JobExecutionsRetryConfigTypeDef = ..., # (7)
documentParameters: Mapping[str, str] = ...,
schedulingConfig: SchedulingConfigTypeDef = ..., # (8)
) -> CreateJobResponseTypeDef: # (9)
...
- See PresignedUrlConfigTypeDef
- See TargetSelectionType
- See JobExecutionsRolloutConfigTypeDef
- See AbortConfigTypeDef
- See TimeoutConfigTypeDef
- See TagTypeDef
- See JobExecutionsRetryConfigTypeDef
- See SchedulingConfigTypeDef
- See CreateJobResponseTypeDef
kwargs: CreateJobRequestRequestTypeDef = { # (1)
"jobId": ...,
"targets": ...,
}
parent.create_job(**kwargs)
create_job_template
Creates a job template.
Type annotations and code completion for boto3.client("iot").create_job_template
method.
boto3 documentation
def create_job_template(
self,
*,
jobTemplateId: str,
description: str,
jobArn: str = ...,
documentSource: str = ...,
document: str = ...,
presignedUrlConfig: PresignedUrlConfigTypeDef = ..., # (1)
jobExecutionsRolloutConfig: JobExecutionsRolloutConfigTypeDef = ..., # (2)
abortConfig: AbortConfigTypeDef = ..., # (3)
timeoutConfig: TimeoutConfigTypeDef = ..., # (4)
tags: Sequence[TagTypeDef] = ..., # (5)
jobExecutionsRetryConfig: JobExecutionsRetryConfigTypeDef = ..., # (6)
) -> CreateJobTemplateResponseTypeDef: # (7)
...
- See PresignedUrlConfigTypeDef
- See JobExecutionsRolloutConfigTypeDef
- See AbortConfigTypeDef
- See TimeoutConfigTypeDef
- See TagTypeDef
- See JobExecutionsRetryConfigTypeDef
- See CreateJobTemplateResponseTypeDef
kwargs: CreateJobTemplateRequestRequestTypeDef = { # (1)
"jobTemplateId": ...,
"description": ...,
}
parent.create_job_template(**kwargs)
create_keys_and_certificate
Creates a 2048-bit RSA key pair and issues an X.509 certificate using the issued public key.
Type annotations and code completion for boto3.client("iot").create_keys_and_certificate
method.
boto3 documentation
def create_keys_and_certificate(
self,
*,
setAsActive: bool = ...,
) -> CreateKeysAndCertificateResponseTypeDef: # (1)
...
kwargs: CreateKeysAndCertificateRequestRequestTypeDef = { # (1)
"setAsActive": ...,
}
parent.create_keys_and_certificate(**kwargs)
create_mitigation_action
Defines an action that can be applied to audit findings by using StartAuditMitigationActionsTask.
Type annotations and code completion for boto3.client("iot").create_mitigation_action
method.
boto3 documentation
def create_mitigation_action(
self,
*,
actionName: str,
roleArn: str,
actionParams: MitigationActionParamsTypeDef, # (1)
tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateMitigationActionResponseTypeDef: # (3)
...
kwargs: CreateMitigationActionRequestRequestTypeDef = { # (1)
"actionName": ...,
"roleArn": ...,
"actionParams": ...,
}
parent.create_mitigation_action(**kwargs)
create_ota_update
Creates an IoT OTA update on a target group of things or groups.
Type annotations and code completion for boto3.client("iot").create_ota_update
method.
boto3 documentation
def create_ota_update(
self,
*,
otaUpdateId: str,
targets: Sequence[str],
files: Sequence[OTAUpdateFileTypeDef], # (1)
roleArn: str,
description: str = ...,
protocols: Sequence[ProtocolType] = ..., # (2)
targetSelection: TargetSelectionType = ..., # (3)
awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfigTypeDef = ..., # (4)
awsJobPresignedUrlConfig: AwsJobPresignedUrlConfigTypeDef = ..., # (5)
awsJobAbortConfig: AwsJobAbortConfigTypeDef = ..., # (6)
awsJobTimeoutConfig: AwsJobTimeoutConfigTypeDef = ..., # (7)
additionalParameters: Mapping[str, str] = ...,
tags: Sequence[TagTypeDef] = ..., # (8)
) -> CreateOTAUpdateResponseTypeDef: # (9)
...
- See OTAUpdateFileTypeDef
- See ProtocolType
- See TargetSelectionType
- See AwsJobExecutionsRolloutConfigTypeDef
- See AwsJobPresignedUrlConfigTypeDef
- See AwsJobAbortConfigTypeDef
- See AwsJobTimeoutConfigTypeDef
- See TagTypeDef
- See CreateOTAUpdateResponseTypeDef
kwargs: CreateOTAUpdateRequestRequestTypeDef = { # (1)
"otaUpdateId": ...,
"targets": ...,
"files": ...,
"roleArn": ...,
}
parent.create_ota_update(**kwargs)
create_policy
Creates an IoT policy.
Type annotations and code completion for boto3.client("iot").create_policy
method.
boto3 documentation
def create_policy(
self,
*,
policyName: str,
policyDocument: str,
tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreatePolicyResponseTypeDef: # (2)
...
kwargs: CreatePolicyRequestRequestTypeDef = { # (1)
"policyName": ...,
"policyDocument": ...,
}
parent.create_policy(**kwargs)
create_policy_version
Creates a new version of the specified IoT policy.
Type annotations and code completion for boto3.client("iot").create_policy_version
method.
boto3 documentation
def create_policy_version(
self,
*,
policyName: str,
policyDocument: str,
setAsDefault: bool = ...,
) -> CreatePolicyVersionResponseTypeDef: # (1)
...
kwargs: CreatePolicyVersionRequestRequestTypeDef = { # (1)
"policyName": ...,
"policyDocument": ...,
}
parent.create_policy_version(**kwargs)
create_provisioning_claim
Creates a provisioning claim.
Type annotations and code completion for boto3.client("iot").create_provisioning_claim
method.