ReportingService2005.SetModelItemPolicies Method

Sets security policies on a model item.

Namespace:  ReportService2005
Assembly:  ReportService2005 (in ReportService2005.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetModelItemPolicies", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("BatchHeaderValue")> _
Public Sub SetModelItemPolicies ( _
    Model As String, _
    ModelItemID As String, _
    Policies As Policy() _
)
'Usage
Dim instance As ReportingService2005
Dim Model As String
Dim ModelItemID As String
Dim Policies As Policy()

instance.SetModelItemPolicies(Model, _
    ModelItemID, Policies)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetModelItemPolicies", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("BatchHeaderValue")]
public void SetModelItemPolicies(
    string Model,
    string ModelItemID,
    Policy[] Policies
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetModelItemPolicies", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"BatchHeaderValue")]
public:
void SetModelItemPolicies(
    String^ Model, 
    String^ ModelItemID, 
    array<Policy^>^ Policies
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/SetModelItemPolicies", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("BatchHeaderValue")>]
member SetModelItemPolicies : 
        Model:string * 
        ModelItemID:string * 
        Policies:Policy[] -> unit 
public function SetModelItemPolicies(
    Model : String, 
    ModelItemID : String, 
    Policies : Policy[]
)

Parameters

  • ModelItemID
    Type: System.String
    The ID of a model item in the model for which to set permissions.

Remarks

When SetModelItemPolicies is called, the list of policies on the model item is replaced by the list specified in the method call.

If there is not at least one policy assigned to the model item, SetModelItemPolicies returns the error rsModelRootPolicyRequired.

The newly supplied policies may propagate to contained objects.

If the policies for the model item are inherited from the parent before the call to SetModelItemPolicies, the inheritance is broken upon successful completion of SetModelItemPolicies.