Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config guide to include client context params usage #3894

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/source/guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,33 @@ 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's client homepage 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`` option. 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',
signature_version='v4',
client_context_params={
'my_great_context_param': 'foo'
}
)

client = boto3.client('kinesis', config=my_config)

If you require different settings per call, you will need to create a new client. Boto3 does not support differing configurations per call.


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