GithubHelp home page GithubHelp logo

Understanding read the docs about boto3 HOT 6 CLOSED

boto avatar boto commented on July 22, 2024
Understanding read the docs

from boto3.

Comments (6)

owenrumney avatar owenrumney commented on July 22, 2024

Thanks @danielgtaylor

I saw your comment with an example but then it just disappeared - not sure what happened there

from boto3.

danielgtaylor avatar danielgtaylor commented on July 22, 2024

@owenrumney this is a limitation of the generated documentation at the moment. There are two things I would like to add soon:

  1. Describe parameter structure for complex types (lists, structures, maps, etc).
  2. Describe response structure for clients and for low-level responses from resource actions.

As an example, the input documentation of emr.add_job_flow_steps could look something like this:


JobFlowId (string) – Required
A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters
Steps (list) – Required

A list of StepConfig to be executed by the job flow.

StepConfig structure:

{
  "Name": "string",
  "HadoopJarStep": {
    "Args": ['string'],
    "Jar": "string",
    "MainClass": "string",
    "Properties": [
      {'Key': 'string', 'Value': 'string'}
    ]
  },
  "ActionOnFailure": "string"
}

Something along those lines above, but it's still not clear which fields are optional. Any ideas you have would be appreciated.

Sorry, I hit Cmd+Enter too soon and it posted with only half an example before!

from boto3.

owenrumney avatar owenrumney commented on July 22, 2024

@danielgtaylor Excellent - thanks as always for quick response

from boto3.

danielgtaylor avatar danielgtaylor commented on July 22, 2024

It's also worth mentioning that there are two other, albeit slightly more painful, methods of determining this data. The easiest is to just look at the service documentation itself, e.g:

http://docs.aws.amazon.com/ElasticMapReduce/latest/API/API_AddJobFlowSteps.html

You can see that it links "Steps.member.N" to a StepConfig description. It's not perfect, but our parameters match up and it takes away some of the guesswork.

The other method is to use the JSON models. For example, here is the definition of StepConfig and HadoopStepConfig. Unfortunately this requires understanding the JSON service description format, but it's what I used to build the example above so it is possible.

Anyway my ultimate goal is to get the Boto 3 documentation updated so that all of the request and response structures are easy to understand.

from boto3.

danielgtaylor avatar danielgtaylor commented on July 22, 2024

@owenrumney the structure descriptions for parameters and return values have now been merged. Please have a look at the docs and let me know what you think!

from boto3.

owenrumney avatar owenrumney commented on July 22, 2024

@danielgtaylor had a look, much clearer, thanks for updating me that it was there.

from boto3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.