Touchstone 11.0 API Reference
DeleteLayer Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ExposureManagementServiceClient Class : DeleteLayer Method
Contains a DeleteLayerRequest that identifies the Touchstone-generated Layer Sequential Identifier (SID) of the Layer that you want to delete, along with the associated Data Source SID, Business Unit SID, and SQL Instance SID.
Deletes a single Touchstone® Layer, including any associated Sublimits.
Syntax
Public Function DeleteLayer( _
   ByVal request As DeleteLayerRequest _
) As DeleteLayerResponse
Dim instance As ExposureManagementServiceClient
Dim request As DeleteLayerRequest
Dim value As DeleteLayerResponse
 
value = instance.DeleteLayer(request)

Parameters

request
Contains a DeleteLayerRequest that identifies the Touchstone-generated Layer Sequential Identifier (SID) of the Layer that you want to delete, along with the associated Data Source SID, Business Unit SID, and SQL Instance SID.

Return Value

A DeleteLayerResponse containing the Status of the Layer deletion.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

To find the Data Source SID to pass into this method, call the GetDataSources() method.

To find the Layer SID to pass into this method, call the GetLayers() method.

Example
The following example shows how to delete a Touchstone Layer using the DeleteLayer() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.Common.Exposure.Data;
using AIR.Services.ExposureManagement.Api;
            
class SnippetDeleteLayerRequest
{
    private static void DeleteLayer(int businessUnitSid, int sqlInstanceSid, int layerSid, int dataSourceSid)
    {
        ExposureManagementServiceClient exposureManagementClient = new ExposureManagementServiceClient();
        DeleteLayerRequest request = new DeleteLayerRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.DataSourceSid = dataSourceSid;
        request.LayerSid = layerSid;
            
        DeleteLayerResponse response = exposureManagementClient.DeleteLayer(request);
            
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Successfully deleted the Layer");
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ExposureManagementServiceClient Class
ExposureManagementServiceClient Members