MCPcopy Create free account
hub / github.com/aws/aws-cli / document_waiters

Method document_waiters

awscli/botocore/docs/waiter.py:35–57  ·  view source on GitHub ↗

Documents the various waiters for a service. :param section: The section to write to.

(self, section)

Source from the content-addressed store, hash-verified

33 )
34
35 def document_waiters(self, section):
36 """Documents the various waiters for a service.
37
38 :param section: The section to write to.
39 """
40 section.style.h2('Waiters')
41 self._add_overview(section)
42 section.style.new_line()
43 section.writeln('The available waiters are:')
44 section.style.toctree()
45 for waiter_name in self._service_waiter_model.waiter_names:
46 section.style.tocitem(f'{self._service_name}/waiter/{waiter_name}')
47 # Create a new DocumentStructure for each waiter and add contents.
48 waiter_doc_structure = DocumentStructure(
49 waiter_name, target='html'
50 )
51 self._add_single_waiter(waiter_doc_structure, waiter_name)
52 # Write waiters in individual/nested files.
53 # Path: <root>/reference/services/<service>/waiter/<waiter_name>.rst
54 waiter_dir_path = os.path.join(
55 self._root_docs_path, self._service_name, 'waiter'
56 )
57 waiter_doc_structure.write_to_file(waiter_dir_path, waiter_name)
58
59 def _add_single_waiter(self, section, waiter_name):
60 section.add_title_section(waiter_name)

Callers 2

waiter_apiMethod · 0.95
test_document_waitersMethod · 0.80

Calls 9

_add_overviewMethod · 0.95
_add_single_waiterMethod · 0.95
write_to_fileMethod · 0.95
DocumentStructureClass · 0.90
h2Method · 0.45
new_lineMethod · 0.45
writelnMethod · 0.45
toctreeMethod · 0.45
tocitemMethod · 0.45

Tested by 1

test_document_waitersMethod · 0.64