I want to ask if it is possible to get default values from boto3 method.
For example, I want to call client.get_object()
boto3 method.
To call this method, the code will be:
client = boto3.client('s3')
response = client.get_object(
Bucket='string',
IfMatch='string',
IfModifiedSince=datetime(2015, 1, 1),
IfNoneMatch='string',
IfUnmodifiedSince=datetime(2015, 1, 1),
Key='string',
Range='string',
ResponseCacheControl='string',
ResponseContentDisposition='string',
ResponseContentEncoding='string',
ResponseContentLanguage='string',
ResponseContentType='string',
ResponseExpires=datetime(2015, 1, 1),
VersionId='string',
SSECustomerAlgorithm='string',
SSECustomerKey='string',
RequestPayer='requester',
PartNumber=123,
ExpectedBucketOwner='string'
)
If I make a function to call the method, I can pass **kwargs as argument but, how do I verify these arguments?
def call_s3_get_object(**kwargs):
client = boto3.client('s3')
response = client.get_object(
**kwargs
)
I want to ensure that users can't call call_s3_get_object()
and pass any argument that can make it fail.
I see this post post where it is indicated to use inspect.getfullargspec(method)
but it is not working with boto3 methods as this class creates the methods dynamically.
Do you know how can I get arguments verified? Thanks