MCPcopy Index your code
hub / github.com/aws/aws-cli / _add_webapi_crosslink

Method _add_webapi_crosslink

awscli/clidocs.py:502–516  ·  view source on GitHub ↗
(self, help_command)

Source from the content-addressed store, hash-verified

500 self._add_note_for_document_types_if_used(help_command)
501
502 def _add_webapi_crosslink(self, help_command):
503 doc = help_command.doc
504 operation_model = help_command.obj
505 service_model = operation_model.service_model
506 service_uid = service_model.metadata.get('uid')
507 if service_uid is None:
508 # If there's no service_uid in the model, we can't
509 # be certain if the generated cross link will work
510 # so we don't generate any crosslink info.
511 return
512 doc.style.new_paragraph()
513 doc.write("See also: ")
514 link = f'{self.AWS_DOC_BASE}/{service_uid}/{operation_model.name}'
515 doc.style.external_link(title="AWS API Documentation", link=link)
516 doc.writeln('')
517
518 def _add_note_for_document_types_if_used(self, help_command):
519 if operation_uses_document_types(help_command.obj):

Callers 1

doc_descriptionMethod · 0.95

Calls 4

new_paragraphMethod · 0.45
writeMethod · 0.45
external_linkMethod · 0.45
writelnMethod · 0.45

Tested by

no test coverage detected