AWSIoTDataPublishRequest

Objective-C

@interface AWSIoTDataPublishRequest

Swift

class AWSIoTDataPublishRequest

The input for the Publish operation.

Required parameters: [topic]

  • The message body. MQTT accepts text, binary, and empty (null) message payloads.

    Publishing an empty (null) payload with retain = true deletes the retained message identified by topic from Amazon Web Services IoT Core.

    Declaration

    Objective-C

    @property (nonatomic, strong) id _Nullable payload;

    Swift

    var payload: Any? { get set }
  • qos

    The Quality of Service (QoS) level.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable qos;

    Swift

    var qos: NSNumber? { get set }
  • A Boolean value that determines whether to set the RETAIN flag when the message is published.

    Setting the RETAIN flag causes the message to be retained and sent to new subscribers to the topic.

    Valid values: true | false

    Default value: false

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable retainValue;

    Swift

    var retainValue: NSNumber? { get set }
  • The name of the MQTT topic.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable topic;

    Swift

    var topic: String? { get set }