• 沒有找到結果。

CancelCertificateTransfer

在文檔中 AWS IoT (頁 50-62)

CancelCertificateTransfer

Service: AWS IoT

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 (p. 544) instead.) After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.

After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.

Requires permission to access the CancelCertificateTransfer action.

Request Syntax

PATCH /cancel-certificate-transfer/certificateId HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

certificateId (p. 38)

The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.) Length Constraints: Fixed length of 64.

Pattern: (0x)?[a-fA-F0-9]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500 InvalidRequestException

The request is not valid.

CancelCertificateTransfer

HTTP Status Code: 400 ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404 ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503 ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400

TransferAlreadyCompletedException

You can't revert the certificate transfer because the transfer is already complete.

HTTP Status Code: 410 UnauthorizedException

You are not authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

CancelDetectMitigationActionsTask

CancelDetectMitigationActionsTask

Service: AWS IoT

Cancels a Device Defender ML Detect mitigation action.

Requires permission to access the CancelDetectMitigationActionsTask action.

Request Syntax

PUT /detect/mitigationactions/tasks/taskId/cancel HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

taskId (p. 40)

The unique identifier of the task.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9_-]+

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500 InvalidRequestException

The request is not valid.

HTTP Status Code: 400 ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404

CancelDetectMitigationActionsTask

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

CancelJob

CancelJob

Service: AWS IoT Cancels a job.

Requires permission to access the CancelJob action.

Request Syntax

PUT /jobs/jobId/cancel?force=force HTTP/1.1 Content-type: application/json

{ "comment": "string", "reasonCode": "string"

}

URI Request Parameters

The request uses the following URI parameters.

force (p. 42)

(Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false.

Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.

jobId (p. 42)

The unique identifier you assigned to this job when it was created.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_-]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

comment (p. 42)

An optional comment string describing why the job was canceled.

Type: String

Length Constraints: Maximum length of 2028.

Pattern: [^\p{C}]+

Required: No reasonCode (p. 42)

(Optional)A reason code string that explains why the job was canceled.

CancelJob

Type: String

Length Constraints: Maximum length of 128.

Pattern: [\p{Upper}\p{Digit}_]+

Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "description": "string", "jobArn": "string", "jobId": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

description (p. 43)

A short text description of the job.

Type: String

Length Constraints: Maximum length of 2028.

Pattern: [^\p{C}]+

jobArn (p. 43) The job ARN.

Type: String jobId (p. 43)

The unique identifier you assigned to this job when it was created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_-]+

Errors

InvalidRequestException The request is not valid.

HTTP Status Code: 400

CancelJob

ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404 ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503 ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

CancelJobExecution

CancelJobExecution

Service: AWS IoT

Cancels the execution of a job for a given thing.

Requires permission to access the CancelJobExecution action.

Request Syntax

PUT /things/thingName/jobs/jobId/cancel?force=force HTTP/1.1 Content-type: application/json

{ "expectedVersion": number, "statusDetails": { "string" : "string"

} }

URI Request Parameters

The request uses the following URI parameters.

force (p. 45)

(Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false.

Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

jobId (p. 45)

The ID of the job to be canceled.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_-]+

Required: Yes thingName (p. 45)

The name of the thing whose execution of the job will be canceled.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9:_-]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

expectedVersion (p. 45)

(Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not

CancelJobExecution

match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)

Type: Long Required: No statusDetails (p. 45)

A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9:_-]+

Value Length Constraints: Minimum length of 1.

Value Pattern: [^\p{C}]+

Required: No

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

InvalidRequestException The request is not valid.

HTTP Status Code: 400 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.

HTTP Status Code: 409 ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404 ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503

CancelJobExecution

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400 VersionConflictException

An exception thrown when the version of an entity specified with the expectedVersion parameter does not match the latest version in the system.

HTTP Status Code: 409

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

ClearDefaultAuthorizer

ClearDefaultAuthorizer

Service: AWS IoT

Clears the default authorizer.

Requires permission to access the ClearDefaultAuthorizer action.

Request Syntax

DELETE /default-authorizer HTTP/1.1

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500 InvalidRequestException

The request is not valid.

HTTP Status Code: 400 ResourceNotFoundException

The specified resource does not exist.

HTTP Status Code: 404 ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503 ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400

ClearDefaultAuthorizer

UnauthorizedException

You are not authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

在文檔中 AWS IoT (頁 50-62)

相關文件