Skip to content

Commit

Permalink
Update config guide to include client context params usage (#3894)
Browse files Browse the repository at this point in the history
* update config rst with client context params
  • Loading branch information
dlm6693 committed Oct 24, 2023
1 parent 05bf2f4 commit 1298d61
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/source/guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ You can configure how Boto3 uses proxies by specifying the ``proxies_config`` op
With the addition of the ``proxies_config`` option shown here, the proxy will use the specified certificate file for authentication when using the HTTPS proxy.

Using client context parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some services have configuration settings that are specific to their clients. These settings are called client context parameters. Please refer to the ``Client Context Parameters`` section of a service client's documentation for a list of available parameters and information on how to use them.

.. _configure_client_context:

Configuring client context parameters
'''''''''''''''''''''''''''''''''''''
You can configure client context parameters by passing a dictionary of key-value pairs to the ``client_context_params`` parameter in your ``Config``. Invalid parameter values or parameters that are not modeled by the service will be ignored.

.. code-block:: python
import boto3
from botocore.config import Config
my_config = Config(
region_name='us-east-2',
client_context_params={
'my_great_context_param': 'foo'
}
)
client = boto3.client('kinesis', config=my_config)
Boto3 does not support setting ``client_context_params`` per request. Differing configurations will require creation of a new client.

Using environment variables
---------------------------
Expand Down

0 comments on commit 1298d61

Please sign in to comment.