Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Descriptions of Boto3 ClientMethods

I am trying to use Boto3's generate_presigned_url(). The method requires a ClientMethod and parameters to go with that ClientMethod. However, the Boto3 documentation doesn't seem to have any list of ClientMethods with their respective parameters. Where can I find this information?

like image 871
ben Avatar asked Jan 04 '16 02:01

ben


People also ask

What is Boto3 client (' S3 ')?

Boto3 is the name of the Python SDK for AWS. It allows you to directly create, update, and delete AWS resources from your Python scripts.

What does Boto3 client do?

00:00 Boto3's primary function is to make AWS API calls for you. It extracts these APIs in two main ways: clients and resources. Clients give you low-level service access, while resources provide an object-oriented way of working with these services.

What is a low-level service client?

Clients provide a low-level interface to AWS whose methods map close to 1:1 with service APIs. All service operations are supported by clients. Clients are generated from a JSON service definition file.


1 Answers

ClientMethod is just the string name of one of the methods on the client object you are calling generate_presigned_url() on, e.g. for the S3 client the methods are listed here S3.Client. E.g. using the 'get_object' method on the S3 client looks like:

client = boto3.client('s3')
url = client.generate_presigned_url('get_object', 
                                    Params={'Bucket': <name>,'Key': <object>}, 
                                    ExpiresIn=86400)
like image 142
AChampion Avatar answered Oct 25 '22 07:10

AChampion