IoTDataPlane
public struct IoTDataPlane
Client object for interacting with AWS IoTDataPlane service.
AWS IoT AWS IoT-Data enables secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud. It implements a broker for applications and things to publish messages over HTTP (Publish) and retrieve, update, and delete shadows. A shadow is a persistent representation of your things and their state in the AWS cloud. Find the endpoint address for actions in the AWS IoT data plane by running this CLI command: aws iot describe-endpoint –endpoint-type iot:Data-ATS The service name used by AWS Signature Version 4 to sign requests is: iotdevicegateway.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the IoTDataPlane client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
Deletes the shadow for the specified thing. For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
Declaration
Swift
public func deleteThingShadow(_ input: DeleteThingShadowRequest) -> EventLoopFuture<DeleteThingShadowResponse>
-
Gets the shadow for the specified thing. For more information, see GetThingShadow in the AWS IoT Developer Guide.
Declaration
Swift
public func getThingShadow(_ input: GetThingShadowRequest) -> EventLoopFuture<GetThingShadowResponse>
-
Lists the shadows for the specified thing.
Declaration
Swift
public func listNamedShadowsForThing(_ input: ListNamedShadowsForThingRequest) -> EventLoopFuture<ListNamedShadowsForThingResponse>
-
Publishes state information. For more information, see HTTP Protocol in the AWS IoT Developer Guide.
Declaration
Swift
@discardableResult public func publish(_ input: PublishRequest) -> EventLoopFuture<Void>
-
Updates the shadow for the specified thing. For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
Declaration
Swift
public func updateThingShadow(_ input: UpdateThingShadowRequest) -> EventLoopFuture<UpdateThingShadowResponse>