Amazon.SimpleDB.AmazonSimpleDBClient.ListDomains C# (CSharp) Method

ListDomains() public method

The ListDomains operation lists all domains associated with the Access Key ID. It returns domain names up to the limit set by MaxNumberOfDomains. A NextToken is returned if there are more than MaxNumberOfDomains domains. Calling ListDomains successive times with the NextToken provided by the operation returns up to MaxNumberOfDomains more domain names with each successive operation call.
/// The specified NextToken is not valid. /// /// The value for a parameter is invalid. ///
public ListDomains ( ) : ListDomainsResponse
return ListDomainsResponse
        public ListDomainsResponse ListDomains()
        {
            return ListDomains(new ListDomainsRequest());
        }

Same methods

AmazonSimpleDBClient::ListDomains ( ListDomainsRequest request ) : ListDomainsResponse

Usage Example

Ejemplo n.º 1
0
        public static bool CheckForDomains(string[] expectedDomains, AmazonSimpleDBClient sdbClient)
        {
            VerifyKeys();

            ListDomainsRequest listDomainsRequest = new ListDomainsRequest();
            ListDomainsResponse listDomainsResponse = sdbClient.ListDomains(listDomainsRequest);
            if (listDomainsResponse.IsSetListDomainsResult())
            {
                ListDomainsResult result = listDomainsResponse.ListDomainsResult;
                foreach (string expectedDomain in expectedDomains)
                {
                    if (!result.DomainName.Contains(expectedDomain))
                    {
                        // No point checking any more domains because
                        // at least 1 domain doesn't exist
                        return false;
                    }
                }

                // We got this far, indicating that all expectedDomains 
                // were found in the domain list
                return true;
            }

            // No results were returned by the ListDomains call
            // or something else went wrong
            return false;
        }
All Usage Examples Of Amazon.SimpleDB.AmazonSimpleDBClient::ListDomains