Share via


Hosted Exchange::GetPlans

This procedure returns listing of service plans based on optional filters. Optional parameters statusTypeName, categoryName, and planTypeName, restrict the returned service plan records to those that match the criteria. You can use any combination of these parameters or issue none to retrieve an unfiltered list.

Arguments

Input Arguments Required

preferredDomainController

Yes

planTypeName

No

categoryName

No

statusTypeName

No

Output Arguments

None.

Remarks

Method Syntax

public string GetPlans( 
                string preferredDomainController, 
                        string planTypeName,  
                        string categoryName, 
string statusTypeName) 
        

Sample Code

Example XML Response

Shown for format only; content may vary.

<response> 
  <data> 
    <planTypeName>ExchMailbox</planTypeName> 
    <categoryName>HeBusiness</categoryName> 
    <statusTypeName>Enabled</statusTypeName> 
    <preferredDomainController>AD01.fabrikam.Com</preferredDomainController> 
    <servicePlans> 
      <plan> 
        <planName>OutlookMail</planName> 
        <planDescription>Full Outlook client and Outlook Web Access support</planDescription> 
        <PlanStatus>Enabled</PlanStatus> 
        <dateCreated>2003-07-30T15:41:09.937000000</dateCreated> 
        <dateLastUpdated>2003-07-30T15:41:09.937000000</dateLastUpdated> 
        <planTypeName>ExchMailbox</planTypeName> 
      </plan> 
      <plan> 
        <planName>BasicMail</planName> 
        <planDescription>Basic Web Mail</planDescription> 
        <PlanStatus>Enabled</PlanStatus> 
        <dateCreated>2003-07-30T15:41:08.437000000</dateCreated> 
        <dateLastUpdated>2003-07-30T15:41:08.437000000</dateLastUpdated> 
        <planTypeName>ExchMailbox</planTypeName> 
      </plan> 
      <plan> 
        <planName>ProMail</planName> 
        <planDescription>Outlook Web Access with Calendar</planDescription> 
        <PlanStatus>Enabled</PlanStatus> 
        <dateCreated>2003-07-30T15:41:09.263000000</dateCreated> 
        <dateLastUpdated>2003-07-30T15:41:09.263000000</dateLastUpdated> 
        <planTypeName>ExchMailbox</planTypeName> 
      </plan> 
    </servicePlans> 
  </data> 
</response> 
                

Typical C# Usage

//Get user name and password. 
        string userName = this.Request.ServerVariables.Get("AUTH_USER"); 
        string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD"); 
        //Set credentials. 
        hostedExch.PreAuthenticate = true; 
        hostedExch.Credentials = new NetworkCredential(userName,pass); 
 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = hostedExch.GetPlans(preferredDomainController, planTypeName,                 categoryName, statusTypeName); 
                         
        // set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
lblDone.InnerText = successMsg; 
        

Applies To

Hosted Exchange Web Service for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Hosted Exchange::AddAvailablePlans
Hosted Exchange::CreatePlanFeatureTypes
Hosted Exchange::GetAvailablePlans
Hosted Exchange::GetPlanDetail
Hosted Exchange::RemoveAvailablePlans