Class X509CredentialsProvider.X509CredentialsProviderBuilder
java.lang.Object
software.amazon.awssdk.crt.auth.credentials.X509CredentialsProvider.X509CredentialsProviderBuilder
- Enclosing class:
- X509CredentialsProvider
A builder class for the 509 provider and its options
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new X509 credentials provider, based on this builder's configurationwithClientBootstrap
(ClientBootstrap clientBootstrap) Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.withEndpoint
(String endpoint) Sets the endpoint to fetch credentials from.withProxyOptions
(HttpProxyOptions proxyOptions) Sets the proxy configuration to use when making the http request that fetches session credentials from the IoT x509 credentials provider servicewithRoleAlias
(String roleAlias) Sets the role alias to fetch credentials throughwithThingName
(String thingName) Sets the iot thing name to fetch credentials by.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
-
Constructor Details
-
X509CredentialsProviderBuilder
public X509CredentialsProviderBuilder()Default constructor
-
-
Method Details
-
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
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
Sets the iot thing name to fetch credentials by.- Parameters:
thingName
- name of the thing to use- Returns:
- The current builder
-
withRoleAlias
Sets the role alias to fetch credentials through- Parameters:
roleAlias
- name of the role alias to use- Returns:
- The current builder
-
withEndpoint
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
Creates a new X509 credentials provider, based on this builder's configuration- Returns:
- a new X509 credentials provider
-