Policy Policy Policy Class

Definition

This is the non-generated part of the Policy class.

public sealed class Policy : Microsoft.SqlServer.Management.Sdk.Sfc.SfcInstance, Microsoft.SqlServer.Management.Common.IAlterable, Microsoft.SqlServer.Management.Common.ICreatable, Microsoft.SqlServer.Management.Common.IDroppable, Microsoft.SqlServer.Management.Common.IRenamable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcAlterable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcCreatable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcDroppable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcRenamable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcValidate
type Policy = class
    inherit SfcInstance
    interface ISfcCreatable
    interface ICreatable
    interface ISfcDroppable
    interface IDroppable
    interface ISfcAlterable
    interface IAlterable
    interface ISfcRenamable
    interface IRenamable
    interface ISfcValidate
Public NotInheritable Class Policy
Inherits SfcInstance
Implements IAlterable, ICreatable, IDroppable, IRenamable, ISfcAlterable, ISfcCreatable, ISfcDroppable, ISfcRenamable, ISfcValidate
Inheritance
Implements

Constructors

Policy() Policy() Policy()

Default constructor used for deserialization. VSTS 55852.

Policy(PolicyStore, String) Policy(PolicyStore, String) Policy(PolicyStore, String)

Instantiates a new Policy object.

Fields

HelpLinkStringMaxLength HelpLinkStringMaxLength HelpLinkStringMaxLength

Limit on the length of HelpLink property. Note that this is the max hyperlink length accepted by IE.

HelpTextStringMaxLength HelpTextStringMaxLength HelpTextStringMaxLength

Limit on the length of HelpText property specified by user.

Properties

AbstractIdentityKey AbstractIdentityKey AbstractIdentityKey Inherited from SfcInstance
AutomatedPolicyEvaluationMode AutomatedPolicyEvaluationMode AutomatedPolicyEvaluationMode
CategoryId CategoryId CategoryId
Condition Condition Condition
CreateDate CreateDate CreateDate
CreatedBy CreatedBy CreatedBy
DateModified DateModified DateModified
Description Description Description
Enabled Enabled Enabled
EvaluationHistories EvaluationHistories EvaluationHistories
HasScript HasScript HasScript

Shows if any of the conditions referenced by this policy references a t-sql or wql script

HelpLink HelpLink HelpLink
HelpText HelpText HelpText
ID ID ID
IdentityKey IdentityKey IdentityKey
IsSystemObject IsSystemObject IsSystemObject
Metadata Metadata Metadata Inherited from SfcInstance
ModifiedBy ModifiedBy ModifiedBy
Name Name Name
ObjectSet ObjectSet ObjectSet
Parent Parent Parent
PolicyCategory PolicyCategory PolicyCategory
Properties Properties Properties Inherited from SfcInstance
PropertyStorageProvider PropertyStorageProvider PropertyStorageProvider

This property returns the default implementation of SFC for ISfcPropertyStorageProvider interface, it can be overriden in the child classes to return another storage provider (i.e. flat properties list)

(Inherited from SfcInstance)
RootCondition RootCondition RootCondition
ScheduleUid ScheduleUid ScheduleUid
State State State Inherited from SfcInstance
Urn Urn Urn

Create a new Urn string on each request and return it.

(Inherited from SfcInstance)

Methods

Alter() Alter() Alter()

Persists all changes made to this object.

AlterImpl() AlterImpl() AlterImpl() Inherited from SfcInstance
CheckObjectCreated() CheckObjectCreated() CheckObjectCreated()

To be called from domain for when an API requires the object to be Created Stronger than CheckObjectState

(Inherited from SfcInstance)
CheckObjectState() CheckObjectState() CheckObjectState()

To be called from domain for any access to the object

(Inherited from SfcInstance)
Create() Create() Create()

Creates the object on the server.

CreateIdentityKey() CreateIdentityKey() CreateIdentityKey() Inherited from SfcInstance
CreateImpl() CreateImpl() CreateImpl() Inherited from SfcInstance
Discover(ISfcDependencyDiscoveryObjectSink) Discover(ISfcDependencyDiscoveryObjectSink) Discover(ISfcDependencyDiscoveryObjectSink)
Drop() Drop() Drop()

Drops the object and removes it from the collection.

DropImpl() DropImpl() DropImpl() Inherited from SfcInstance
Evaluate(AdHocPolicyEvaluationMode, ISfcConnection[]) Evaluate(AdHocPolicyEvaluationMode, ISfcConnection[]) Evaluate(AdHocPolicyEvaluationMode, ISfcConnection[])
Evaluate(AdHocPolicyEvaluationMode, Object[]) Evaluate(AdHocPolicyEvaluationMode, Object[]) Evaluate(AdHocPolicyEvaluationMode, Object[])
Evaluate(AdHocPolicyEvaluationMode, SfcQueryExpression, ISfcConnection[]) Evaluate(AdHocPolicyEvaluationMode, SfcQueryExpression, ISfcConnection[]) Evaluate(AdHocPolicyEvaluationMode, SfcQueryExpression, ISfcConnection[])
GetChildCollection(String) GetChildCollection(String) GetChildCollection(String)

Get the child collection in this instance for the given element name string.

(Inherited from SfcInstance)
GetDomain() GetDomain() GetDomain() Inherited from SfcInstance
GetObjectFactory() GetObjectFactory() GetObjectFactory()
GetPropertySet() GetPropertySet() GetPropertySet() Inherited from SfcInstance
GetTypeMetadataImpl() GetTypeMetadataImpl() GetTypeMetadataImpl() Inherited from SfcInstance
InitializeUIPropertyState() InitializeUIPropertyState() InitializeUIPropertyState()

Overridable from the child objects who care about initializing their states (dynamic metadata which is currently the ".Enabled" property)

(Inherited from SfcInstance)
MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) MarkForDropImpl(Boolean) Inherited from SfcInstance
MarkRootAsConnected() MarkRootAsConnected() MarkRootAsConnected() Inherited from SfcInstance
MoveImpl(SfcInstance) MoveImpl(SfcInstance) MoveImpl(SfcInstance) Inherited from SfcInstance
OnPropertyMetadataChanges(SfcPropertyMetadataChangedEventArgs) OnPropertyMetadataChanges(SfcPropertyMetadataChangedEventArgs) OnPropertyMetadataChanges(SfcPropertyMetadataChangedEventArgs) Inherited from SfcInstance
OnPropertyValueChanges(PropertyChangedEventArgs) OnPropertyValueChanges(PropertyChangedEventArgs) OnPropertyValueChanges(PropertyChangedEventArgs) Inherited from SfcInstance
PostAlter(Object) PostAlter(Object) PostAlter(Object) Inherited from SfcInstance
PostCreate(Object) PostCreate(Object) PostCreate(Object) Inherited from SfcInstance
PostDrop(Object) PostDrop(Object) PostDrop(Object) Inherited from SfcInstance
PostMove(Object) PostMove(Object) PostMove(Object) Inherited from SfcInstance
PostRename(Object) PostRename(Object) PostRename(Object) Inherited from SfcInstance
ProduceConfigureScript(Object) ProduceConfigureScript(Object) ProduceConfigureScript(Object)
Refresh() Refresh() Refresh()

refreshes the object's properties by reading them from the server

(Inherited from SfcInstance)
Rename(String) Rename(String) Rename(String)

Renames the object on the server.

RenameImpl(SfcKey) RenameImpl(SfcKey) RenameImpl(SfcKey) Inherited from SfcInstance
ResetKey() ResetKey() ResetKey() Inherited from SfcInstance
ScriptAlter() ScriptAlter() ScriptAlter()

Scripts all changes made to this object.

ScriptAlterWithObjectSet() ScriptAlterWithObjectSet() ScriptAlterWithObjectSet()

Scripts Alter Policy with dependent ObjectSet. Doesn't include referenced Conditions.

ScriptCreate() ScriptCreate() ScriptCreate()

Scripts creation of the object on the server.

ScriptCreateWithDependencies() ScriptCreateWithDependencies() ScriptCreateWithDependencies()

Scripts Create Policy with all dependencies, including ObjectSet and all referenced Conditions

ScriptCreateWithObjectSet() ScriptCreateWithObjectSet() ScriptCreateWithObjectSet()

Scripts Create Policy with dependent ObjectSet. Doesn't include referenced Conditions.

ScriptDrop() ScriptDrop() ScriptDrop()

Scripts deletion of the object

ScriptDropWithObjectSet() ScriptDropWithObjectSet() ScriptDropWithObjectSet()

Scripts Drop Policy with dependent ObjectSet. Doesn't include referenced Conditions.

Serialize(XmlWriter) Serialize(XmlWriter) Serialize(XmlWriter) Inherited from SfcInstance
ToString() ToString() ToString() Inherited from SfcInstance
UpdateUIPropertyState() UpdateUIPropertyState() UpdateUIPropertyState() Inherited from SfcInstance
UsesFacet(String) UsesFacet(String) UsesFacet(String)

Returns a boolean indicating if this policy's Condition uses the given facet.

Validate() Validate() Validate()

Basic child object's validation

(Inherited from SfcInstance)
Validate(String) Validate(String) Validate(String)

Policy validation Unlike ISfcValidate.Validate, this method will throw the first exception it encounters If Evaluation of this method doesn't produce any exceptions, validation passed

Events

ConnectionProcessingFinished ConnectionProcessingFinished ConnectionProcessingFinished

Event that gets fired after the policy execution has ended.

ConnectionProcessingStarted ConnectionProcessingStarted ConnectionProcessingStarted

Event fired before the policy execution starts for one connection.

PolicyEvaluationFinished PolicyEvaluationFinished PolicyEvaluationFinished

Event that gets fired after the policy execution has ended.

PolicyEvaluationStarted PolicyEvaluationStarted PolicyEvaluationStarted

Event fired before the policy execution starts.

propertyChanged propertyChanged propertyChanged Inherited from SfcInstance
PropertyChanged PropertyChanged PropertyChanged Inherited from SfcInstance
propertyMetadataChanged propertyMetadataChanged propertyMetadataChanged Inherited from SfcInstance
PropertyMetadataChanged PropertyMetadataChanged PropertyMetadataChanged Inherited from SfcInstance
TargetProcessed TargetProcessed TargetProcessed

Event fired after a target has been processed.

Explicit Interface Implementations

ISfcRenamable.Rename(SfcKey) ISfcRenamable.Rename(SfcKey) ISfcRenamable.Rename(SfcKey)

Renames the object on the server.

ISfcRenamable.ScriptRename(SfcKey) ISfcRenamable.ScriptRename(SfcKey) ISfcRenamable.ScriptRename(SfcKey)
ISfcValidate.Validate(String, Object[]) ISfcValidate.Validate(String, Object[]) ISfcValidate.Validate(String, Object[])

ISfcValidate implementation for Policy

Applies to