/** * Sets the AWSCredentialsProvider used by the client. If not specified the default is {@link * DefaultAWSCredentialsProviderChain}. * * @param credentialsProvider New AWSCredentialsProvider to use. * @return This object for method chaining. */ public final Subclass withCredentials(AWSCredentialsProvider credentialsProvider) { setCredentials(credentialsProvider); return getSubclass(); }
/** * Sets the endpoint configuration (service endpoint & signing region) to be used for requests. If neither region {@link #setRegion(String)} * or endpoint configuration are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted. * * <p><b>Only use this if using a non-standard service endpoint - the recommended approach for configuring a client is to use {@link #setRegion(String)}</b> * * @param endpointConfiguration The endpointConfiguration to use */ public final void setEndpointConfiguration(EndpointConfiguration endpointConfiguration) { withEndpointConfiguration(endpointConfiguration); }
/** * @return An instance of AwsSyncClientParams that has all params to be used in the sync client * constructor. */ protected final AwsSyncClientParams getSyncClientParams() { return new SyncBuilderParams(); }
/** * Sets the region to be used by the client. This will be used to determine both the * service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1) * for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)} * are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted. * * @param region Region to use * @return This object for method chaining. */ public final Subclass withRegion(String region) { return withRegion(getRegionObject(region)); }
/** * Sets the region to be used by the client. This will be used to determine both the * service endpoint (eg: https://sns.us-west-1.amazonaws.com) and signing region (eg: us-west-1) * for requests. If neither region or endpoint configuration {@link #setEndpointConfiguration(EndpointConfiguration)} * are explicitly provided in the builder the {@link #DEFAULT_REGION_PROVIDER} is consulted. * * @param region Region to use */ public final void setRegion(String region) { withRegion(region); }
/** * Sets the ClientConfiguration to be used by the client. If not specified the default is * typically {@link PredefinedClientConfigurations#defaultConfig} but may differ per service. * * @param config Custom configuration to use * @return This object for method chaining. */ public final Subclass withClientConfiguration(ClientConfiguration config) { setClientConfiguration(config); return getSubclass(); }
/** * Sets the request handlers to use in the client. * * @param handlers Request handlers to use for client. * @return This object for method chaining. */ public final Subclass withRequestHandlers(RequestHandler2... handlers) { setRequestHandlers(handlers); return getSubclass(); }
/** * Sets a custom executor service factory to use for the async clients. The factory will be * called for each async client created through the builder. * * @param executorFactory Factory supplying new instances of {@link ExecutorService} * @return This object for method chaining. */ public final Subclass withExecutorFactory(ExecutorFactory executorFactory) { setExecutorFactory(executorFactory); return getSubclass(); }
/** * Sets a custom RequestMetricCollector to use for the client. * * @param metrics Custom RequestMetricCollector to use. * @return This object for method chaining. */ public final Subclass withMetricsCollector(RequestMetricCollector metrics) { setMetricsCollector(metrics); return getSubclass(); }
/** * Sets a custom MonitoringListener to use for the client. * * @param monitoringListener Custom MonitoringListener to use. * @return This object for method chaining. */ public final Subclass withMonitoringListener(MonitoringListener monitoringListener) { setMonitoringListener(monitoringListener); return getSubclass(); }
/** * @return An instance of AwsAsyncClientParams that has all params to be used in the async * client constructor. */ protected final AwsAsyncClientParams getAsyncClientParams() { return new AsyncBuilderParams(executorFactory); }
/** * Sets the status of FIPS enabled endpoints for clients built with this builder. The default is to not use FIPS * endpoints. * * @param fipsEnabled * True if FIPS endpoints should be used, false if FIPS endpoints should not be used. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public void setFipsEnabled(Boolean fipsEnabled) { super.putAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED, fipsEnabled); }
/** * @returns The current setting for Dual-Stack endpoints (supports both IPv4 and IPv6) configured in the builder. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public Boolean isDualstackEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED); }
/** * Sets the status of Dual-Stack endpoints (supports both IPv4 and IPv6) for clients built with this builder. The * default is to not use Dual-Stack endpoints. * * @param dualstackEnabled * True if Dual-Stack endpoints should be used, false if Dual-Stack endpoints should not be used. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public void setDualstackEnabled(Boolean dualstackEnabled) { super.putAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED, dualstackEnabled); }
/** * @returns The current setting for Dual-Stack endpoints (supports both IPv4 and IPv6) configured in the builder. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public Boolean isDualstackEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED); }
/** * Sets the value of an advanced config option. * @param key Key of value to set. * @param value The new value. * @param <T> Type of value. */ protected final <T> void putAdvancedConfig(AdvancedConfig.Key<T> key, T value) { advancedConfig.put(key, value); }
/** * Sets the status of Dual-Stack endpoints (supports both IPv4 and IPv6) for clients built with this builder. The * default is to not use Dual-Stack endpoints. * * @param dualstackEnabled * True if Dual-Stack endpoints should be used, false if Dual-Stack endpoints should not be used. * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/dual-stack-endpoints.html">Using Amazon S3 * Dual-Stack Endpoints</a> */ public void setDualstackEnabled(Boolean dualstackEnabled) { super.putAdvancedConfig(S3ControlClientOptions.DUALSTACK_ENABLED, dualstackEnabled); }
/** * @returns The current setting for FIPS enabled endpoints configured in the builder. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public Boolean isFipsEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED); }
/** * Sets the status of FIPS enabled endpoints for clients built with this builder. The default is to not use FIPS * endpoints. * * @param fipsEnabled * True if FIPS endpoints should be used, false if FIPS endpoints should not be used. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public void setFipsEnabled(Boolean fipsEnabled) { super.putAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED, fipsEnabled); }
/** * @returns The current setting for FIPS enabled endpoints configured in the builder. * @see <a href="https://www.nist.gov/itl/fips-general-information">FIPS General Information</a> */ public Boolean isFipsEnabled() { return super.getAdvancedConfig(S3ControlClientOptions.FIPS_ENABLED); }