Class X509CredentialsProvider.X509CredentialsProviderBuilder
- java.lang.Object
-
- software.amazon.awssdk.crt.auth.credentials.X509CredentialsProvider.X509CredentialsProviderBuilder
-
- Enclosing class:
- X509CredentialsProvider
public static class X509CredentialsProvider.X509CredentialsProviderBuilder extends Object
A builder class for the 509 provider and its options
-
-
Constructor Summary
Constructors Constructor Description X509CredentialsProviderBuilder()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509CredentialsProvider
build()
Creates a new X509 credentials provider, based on this builder's configurationX509CredentialsProvider.X509CredentialsProviderBuilder
withClientBootstrap(ClientBootstrap clientBootstrap)
Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.X509CredentialsProvider.X509CredentialsProviderBuilder
withEndpoint(String endpoint)
Sets the endpoint to fetch credentials from.X509CredentialsProvider.X509CredentialsProviderBuilder
withProxyOptions(HttpProxyOptions proxyOptions)
Sets the proxy configuration to use when making the http request that fetches session credentials from the IoT x509 credentials provider serviceX509CredentialsProvider.X509CredentialsProviderBuilder
withRoleAlias(String roleAlias)
Sets the role alias to fetch credentials throughX509CredentialsProvider.X509CredentialsProviderBuilder
withThingName(String thingName)
Sets the iot thing name to fetch credentials by.X509CredentialsProvider.X509CredentialsProviderBuilder
withTlsContext(TlsContext tlsContext)
Sets the tls context initialized with a x509 certificate and private key suitable for queries against the account's iot credential provider endpoint
-
-
-
Method Detail
-
withClientBootstrap
public X509CredentialsProvider.X509CredentialsProviderBuilder withClientBootstrap(ClientBootstrap clientBootstrap)
Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.- Parameters:
clientBootstrap
- client bootstrap to use- Returns:
- The current builder
-
withTlsContext
public X509CredentialsProvider.X509CredentialsProviderBuilder withTlsContext(TlsContext tlsContext)
Sets the tls context initialized with a x509 certificate and private key suitable for queries against the account's iot credential provider endpoint- Parameters:
tlsContext
- the tls context to use when establishing the http connection to iot- Returns:
- The current builder
-
withThingName
public X509CredentialsProvider.X509CredentialsProviderBuilder withThingName(String thingName)
Sets the iot thing name to fetch credentials by.- Parameters:
thingName
- name of the thing to use- Returns:
- The current builder
-
withRoleAlias
public X509CredentialsProvider.X509CredentialsProviderBuilder withRoleAlias(String roleAlias)
Sets the role alias to fetch credentials through- Parameters:
roleAlias
- name of the role alias to use- Returns:
- The current builder
-
withEndpoint
public X509CredentialsProvider.X509CredentialsProviderBuilder withEndpoint(String endpoint)
Sets the endpoint to fetch credentials from. This is a per-account value that can be determined via the cli: 'aws iot describe-endpoint --endpoint-type iot:CredentialProvider'- Parameters:
endpoint
- credentials provider endpoint- Returns:
- The current builder
-
withProxyOptions
public X509CredentialsProvider.X509CredentialsProviderBuilder withProxyOptions(HttpProxyOptions proxyOptions)
Sets the proxy configuration to use when making the http request that fetches session credentials from the IoT x509 credentials provider service- Parameters:
proxyOptions
- proxy configuration for the credentials fetching http request- Returns:
- The current builder
-
build
public X509CredentialsProvider build()
Creates a new X509 credentials provider, based on this builder's configuration- Returns:
- a new X509 credentials provider
-
-