AWS IoT Device SDK C++ v2: Aws::Iot::WebsocketConfig Struct Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Public Member Functions | Public Attributes | List of all members
Aws::Iot::WebsocketConfig Struct Reference

`#include <MqttClient.h>`

## Public Member Functions
| WebsocketConfig (const Crt::String &signingRegion, Crt::Io::ClientBootstrap *bootstrap, Crt::Allocator *allocator=Crt::g_allocator) noexcept
| WebsocketConfig (const Crt::String &signingRegion, const std::shared_ptr< Crt::Auth::ICredentialsProvider > &credentialsProvider, Crt::Allocator *allocator=Crt::g_allocator) noexcept
| WebsocketConfig (const std::shared_ptr< Crt::Auth::ICredentialsProvider > &credentialsProvider, const std::shared_ptr< Crt::Auth::IHttpRequestSigner > &signer, CreateSigningConfig createSigningConfig) noexcept

## Public Attributes
std::shared_ptr< Crt::Auth::ICredentialsProvider > | CredentialsProvider
std::shared_ptr< Crt::Auth::IHttpRequestSigner > | Signer
CreateSigningConfig | CreateSigningConfigCb
Crt::Optional< Crt::Http::HttpClientConnectionProxyOptions > | ProxyOptions
Crt::String | SigningRegion
Crt::String | ServiceName

## Detailed Description

Class encapsulating configuration for establishing an Aws IoT mqtt connection via websockets

## Constructor & Destructor Documentation

## ◆ WebsocketConfig() [1/3]

Aws::Iot::WebsocketConfig::WebsocketConfig | ( | const Crt::String & | signingRegion,
|  | Crt::Io::ClientBootstrap * | bootstrap,
|  | Crt::Allocator * | allocator = `Crt::g_allocator`
| ) |  |
| noexcept

Create a websocket configuration for use with the default credentials provider chain. Signing region will be used for Sigv4 signature calculations.

Parameters

  signingRegion | Aws region that is being connected to. Required in order to properly sign the handshake upgrade request
  bootstrap | client bootstrap to establish any connections needed by the default credentials provider chain which will get built for the user

## ◆ WebsocketConfig() [2/3]

Aws::Iot::WebsocketConfig::WebsocketConfig | ( | const Crt::String & | signingRegion,
|  | const std::shared_ptr< Crt::Auth::ICredentialsProvider > & | credentialsProvider,
|  | Crt::Allocator * | allocator = `Crt::g_allocator`
| ) |  |
| noexcept

Create a websocket configuration for use with a custom credentials provider. Signing region will be used for Sigv4 signature calculations.

Parameters

  signingRegion | Aws region that is being connected to. Required in order to properly sign the handshake upgrade request
  credentialsProvider | credentials provider to source AWS credentials from

## ◆ WebsocketConfig() [3/3]

Aws::Iot::WebsocketConfig::WebsocketConfig | ( | const std::shared_ptr< Crt::Auth::ICredentialsProvider > & | credentialsProvider,
|  | const std::shared_ptr< Crt::Auth::IHttpRequestSigner > & | signer,
|  | Iot::CreateSigningConfig | createConfig
| ) |  |
| noexcept

Create a websocket configuration for use with a custom credentials provider, and a custom signer.

You'll need to provide a function for use with creating a signing Config and pass it to createSigningConfig.

This is useful for cases use with: https://docs.aws.amazon.com/iot/latest/developerguide/custom-auth.html

Parameters

  credentialsProvider |
  signer |
  createSigningConfig |

## Member Data Documentation

## ◆ CreateSigningConfigCb

CreateSigningConfig Aws::Iot::WebsocketConfig::CreateSigningConfigCb

## ◆ CredentialsProvider

std::shared_ptr<Crt::Auth::ICredentialsProvider> Aws::Iot::WebsocketConfig::CredentialsProvider

## ◆ ProxyOptions

Crt::Optional<Crt::Http::HttpClientConnectionProxyOptions> Aws::Iot::WebsocketConfig::ProxyOptions

Deprecated:
  Specify ProxyOptions to use a proxy with your websocket connection.

If MqttClientConnectionConfigBuilder::m_proxyOptions is valid, then that will be used over this value.

## ◆ ServiceName

Crt::String Aws::Iot::WebsocketConfig::ServiceName

## ◆ Signer

std::shared_ptr<Crt::Auth::IHttpRequestSigner> Aws::Iot::WebsocketConfig::Signer

## ◆ SigningRegion

Crt::String Aws::Iot::WebsocketConfig::SigningRegion

The documentation for this struct was generated from the following files:

- crt/aws-crt-cpp/include/aws/iot/MqttClient.h
- crt/aws-crt-cpp/source/iot/MqttClient.cpp