Este conteúdo não está disponível no idioma selecionado.

3.4. Retrieving a Specific Resource from a Collection


In these examples a specific resource is retrieved from a collection using the get method.

Example 3.1. Retrieving a Specific Resource by Name

Retrieving the Default data center from the datacenters collection using the name parameter of the get method:
dc = api.datacenters.get("Default")
Copy to Clipboard Toggle word wrap
This syntax is equivalent:
dc = api.datacenters.get(name="Default")
Copy to Clipboard Toggle word wrap
Additional information can be retrieved for get requests using the all_content header.

Example 3.2. Retrieving Additional Information on a Specific Resource

vm = api.vms.get(name="VM01", all_content=True)
Copy to Clipboard Toggle word wrap
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat