Class BedrockBackend.Builder

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final BedrockBackend.Builder fromEnv(AwsCredentialsProvider awsCredentialsProvider) Resolves the AWS credentials from the environment, or other sources configured by the credentials provider.
      final BedrockBackend.Builder fromEnv() Resolves the AWS credentials from the environment, or other sources configured by the credentials provider.
      final BedrockBackend.Builder awsCredentialsProvider(AwsCredentialsProvider awsCredentialsProvider) Sets the AWS credentials provider that will be used to resolve credentials.
      final BedrockBackend.Builder awsCredentials(AwsCredentials awsCredentials) Creates and sets an AWS credentials provider that provides only the given credentials.
      final BedrockBackend.Builder region(Region region) Sets the region to use when constructing the base URL for requests.
      final BedrockBackend build()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • fromEnv

        @JvmOverloads() final BedrockBackend.Builder fromEnv(AwsCredentialsProvider awsCredentialsProvider)

        Resolves the AWS credentials from the environment, or other sources configured by the credentials provider. If no provider is given, the AWS DefaultCredentialsProvider is used, which is suitable for many use cases. The configuration of that provider follows its usual defaults, so asynchronous refreshing is not enabled. See the AWS documentation for details. For other use cases, pass a credentials provider configured as required. The provider, whether given explicitly or by default, overrides any provider set via awsCredentialsProvider or awsCredentials.

        The region is also resolved immediately using the default AWS region provider chain. Once resolved here, the region will not be changed again.

        When called, this method will immediately attempt to resolve the AWS credentials and region. An error will occur if they cannot be resolved.

      • fromEnv

        @JvmOverloads() final BedrockBackend.Builder fromEnv()

        Resolves the AWS credentials from the environment, or other sources configured by the credentials provider. If no provider is given, the AWS DefaultCredentialsProvider is used, which is suitable for many use cases. The configuration of that provider follows its usual defaults, so asynchronous refreshing is not enabled. See the AWS documentation for details. For other use cases, pass a credentials provider configured as required. The provider, whether given explicitly or by default, overrides any provider set via awsCredentialsProvider or awsCredentials.

        The region is also resolved immediately using the default AWS region provider chain. Once resolved here, the region will not be changed again.

        When called, this method will immediately attempt to resolve the AWS credentials and region. An error will occur if they cannot be resolved.

      • awsCredentialsProvider

         final BedrockBackend.Builder awsCredentialsProvider(AwsCredentialsProvider awsCredentialsProvider)

        Sets the AWS credentials provider that will be used to resolve credentials. Credentials will not be resolved immediately. If misconfigured, an error may not be reported until the first client request is made. To set a credentials provider and confirm that it can resolve credentials, call fromEnv. If called after fromEnv, this overrides the credentials provider configured by fromEnv.

      • awsCredentials

         final BedrockBackend.Builder awsCredentials(AwsCredentials awsCredentials)

        Creates and sets an AWS credentials provider that provides only the given credentials. This is a convenience for simple use cases, such as when testing. The provider overrides any provider previously set by awsCredentialsProvider or fromEnv.

      • region

         final BedrockBackend.Builder region(Region region)

        Sets the region to use when constructing the base URL for requests. Alternatively, this may be resolved from the environment by calling fromEnv. If called after fromEnv, this overrides the region resolved by fromEnv.