Amazon AWS SDK Guide de l'utilisateur Page 69

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 76
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 68
}
}
Listing Amazon SWF Domains Using the AWS SDK
for Java
You can list the Amazon SWF domains associated with your account and AWS region by registration
type.
To list Amazon SWF domains
1. Create a ListDomainsRequest object, and specify the registration status of the domains that you're
interested in—this is required.
2. Call AmazonSimpleWorkflowClient.listDomains with the ListDomainRequest object. Results are
provided in a DomainInfos object.
3. Call getDomainInfos on the returned object to get a list of DomainInfo objects.
4. Call getName on each DomainInfo object to get its name.
The following code demonstrates this procedure:
public void list_swf_domains(AmazonSimpleWorkflowClient swf)
{
ListDomainsRequest request = new ListDomainsRequest();
request.setRegistrationStatus("REGISTERED");
DomainInfos domains = swf.listDomains(request);
System.out.println("Current Domains:");
for (DomainInfo di : domains.getDomainInfos())
{
System.out.println(" * " + di.getName());
}
}
Version v1.0.0
65
AWS SDK for Java Developer Guide
Listing Amazon SWF Domains
Vue de la page 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 75 76

Commentaires sur ces manuels

Pas de commentaire