AWS IoT Device SDK C++ v2 1.44.1
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Iot::WebsocketConfig Struct Reference

#include <MqttCommon.h>

Public Member Functions

 WebsocketConfig (const Crt::String &signingRegion, Crt::Io::ClientBootstrap *bootstrap, Crt::Allocator *allocator=Crt::ApiAllocator()) noexcept
 WebsocketConfig (const Crt::String &signingRegion, Crt::Allocator *allocator=Crt::ApiAllocator()) noexcept
 WebsocketConfig (const Crt::String &signingRegion, const std::shared_ptr< Crt::Auth::ICredentialsProvider > &credentialsProvider, Crt::Allocator *allocator=Crt::ApiAllocator()) 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::ICredentialsProviderCredentialsProvider
std::shared_ptr< Crt::Auth::IHttpRequestSignerSigner
CreateSigningConfig CreateSigningConfigCb
Crt::Optional< Crt::Http::HttpClientConnectionProxyOptionsProxyOptions
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/4]

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

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

Parameters
signingRegionAws region that is being connected to. Required in order to properly sign the handshake upgrade request
bootstrapclient bootstrap to establish any connections needed by the default credentials provider chain which will get built for the user
allocatormemory allocator to use

◆ WebsocketConfig() [2/4]

Aws::Iot::WebsocketConfig::WebsocketConfig ( const Crt::String & signingRegion,
Crt::Allocator * allocator = Crt::ApiAllocator() )
noexcept

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

For more information on the default ClientBootstrap see Aws::Crt::ApiHandle::GetOrCreateDefaultClientBootstrap

Parameters
signingRegionAws region that is being connected to. Required in order to properly sign the handshake upgrade request
allocatormemory allocator to use

◆ WebsocketConfig() [3/4]

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

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

Parameters
signingRegionAws region that is being connected to. Required in order to properly sign the handshake upgrade request
credentialsProvidercredentials provider to source AWS credentials from
allocatormemory allocator to use

◆ WebsocketConfig() [4/4]

Aws::Iot::WebsocketConfig::WebsocketConfig ( const std::shared_ptr< Crt::Auth::ICredentialsProvider > & credentialsProvider,
const std::shared_ptr< Crt::Auth::IHttpRequestSigner > & signer,
Iot::CreateSigningConfig createSigningConfig )
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
credentialsProvidercredentials provider
signerHTTP request signer
createSigningConfigfunction that creates a signing config

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: