Export (0) Print
Expand All

PolicyStore Class

The PolicyStore type is the root of the DMF object model.

System.Object
  Microsoft.SqlServer.Management.Sdk.Sfc.SfcInstance
    Microsoft.SqlServer.Management.Dmf.PolicyStore

Namespace:  Microsoft.SqlServer.Management.Dmf
Assembly:  Microsoft.SqlServer.Dmf (in Microsoft.SqlServer.Dmf.dll)

[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public sealed class PolicyStore : SfcInstance, 
	ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, 
	ISfcSerializableUpgrade, ISfcValidate

The PolicyStore type exposes the following members.

  NameDescription
Public methodPolicyStore()Initializes a new instance of the PolicyStore class.
Public methodPolicyStore(SfcConnection)Initializes a new instance of the PolicyStore class.
Top

  NameDescription
Protected propertyAbstractIdentityKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public propertyConditionsRepresents a collection of Condition objects. Each Condition object represents a policy-based Management condition.
Public propertyEnabledGets or sets whether the policy store is enabled.
Public propertyStatic memberFacetsRepresents a collection of FacetInfo objects. Each FacetInfo object represents a policy-based Management registered facet.
Public propertyHistoryRetentionInDaysGets or sets the number of days the policy store retains history.
Public propertyIdentityKeyGets the identity key.
Public propertyLogOnSuccessGets or sets whether log-on succeeded.
Public propertyMetadataReturns metadata about the instance and its domain. (Inherited from SfcInstance.)
Public propertyNameGets the name of the policy store.
Public propertyObjectSetsRepresents a collection of ObjectSet objects. Each ObjectSet object represents a policy-based Management object set.
Public propertyParentGets or sets the instance parent via the keychain. (Inherited from SfcInstance.)
Public propertyPoliciesRepresents a collection of Policy objects. Each Policy object represents a policy-based Management policy.
Public propertyPolicyCategoriesRepresents a collection of PolicyCategory objects. Each PolicyCategory object represents a policy-based Management policy category.
Public propertyPolicyCategorySubscriptionsRepresents a collection of PolicyCategorySubscription objects. Each PolicyCategorySubscription object represents a policy-based Management policy category subscription.
Public propertyPropertiesReturns a collection instance properties. (Inherited from SfcInstance.)
Protected propertyPropertyStorageProviderDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public propertySqlStoreConnectionGets or sets the SqlStoreConnection object.
Protected propertyStateReturns the state of the SfcInstance object. (Inherited from SfcInstance.)
Public propertyUrnReturns the uniform resource name of the SfcInstance object. (Inherited from SfcInstance.)
Top

  NameDescription
Public methodAlterAlters a previously created PolicyStore object.
Protected methodAlterImplDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodCheckObjectCreatedDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodCheckObjectStateDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodCreateIdentityKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodCreateImplDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodCreatePolicyFromFacet(SfcQueryExpression, String, String, String)Creates new policy from an SfcQueryExpression object and names.
Public methodCreatePolicyFromFacet(Object, String, String, String, XmlWriter)Creates new policy from an Object and an XmlWriter object.
Public methodCreatePolicyFromFacet(SfcQueryExpression, String, String, String, XmlWriter)Creates new policy from an SfcQueryExpression object and an XmlWriter object.
Public methodDeserializePolicyDeserializes a single policy and its associated condition from the specified XML reader into the policy store.
Public methodDiscoverDiscovers dependency relationships for the specified sink. (Overrides SfcInstance.Discover(ISfcDependencyDiscoveryObjectSink).)
Protected methodDropImplDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodEnumApplicablePoliciesEnumerates policy items specified by an SfcQueryExpression object.
Public methodEnumApplicablePolicyCategoriesEnumerates conditions specified by an SfcQueryExpression object.
Public methodEnumConditionsOnFacet(String)Returns a list of conditions that are associated with the specified facet.
Public methodEnumConditionsOnFacet(String, PolicyStore.EnumerationMode)Enumerates a StringCollection of conditions.
Public methodStatic memberEnumDomainFacetsEnumerates facets in a domain.
Public methodEnumPoliciesOnFacet(String)Returns a list of policies associated with the specified facet.
Public methodEnumPoliciesOnFacet(String, PolicyStore.EnumerationMode)Enumerates policy items on a facet.
Public methodEnumPolicyCategoriesReturns an enumerated list of policy category information.
Public methodEnumRootConditionsReturns a list of root conditions for the specified type.
Public methodStatic memberEnumRootFacetsReturns a list of root facets for the specified type.
Public methodEnumTargetSetConditions(Type)Returns a list of target set conditions for the specified type.
Public methodEnumTargetSetConditions(Type, PolicyStore.EnumerationMode)Enumerates conditions on the target.
Public methodEquals (Inherited from Object.)
Public methodEraseSystemHealthPhantomRecordsDeletes system health phantom records specified by a SfcQueryExpression.
Protected methodFinalize (Inherited from Object.)
Public methodGetAggregatedHealthStateDeletes system health phantom records specified by a SfcQueryExpression.
Protected methodGetChildCollectionDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodGetDomainDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetPropertySetReturns the set of properties for the SfcInstance object. (Inherited from SfcInstance.)
Public methodGetType (Inherited from Object.)
Protected methodGetTypeMetadataImplIndicates the domains that override by returning the right TypeMetadata class directly. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodImportPolicyImports a single policy and its associated condition from the given XML reader into the policy store.
Protected methodInitializeUIPropertyStateDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodMarkForDropImplReturns a value that indicates the existing objects to be dropped. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodMarkRootAsConnectedDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodMarkSystemObjectSets the name of a Policy, Condition, or ObjectSet.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodMoveImplIndicates the new parent object to move in an instance. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodOnPropertyMetadataChangesInvoked whenever the effective value of any SfcInstance metadata is updated. (Inherited from SfcInstance.)
Protected methodOnPropertyValueChangesInvoked whenever the effective value of any SfcInstance property is updated. (Inherited from SfcInstance.)
Protected methodPostAlterDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodPostCreateIndicates the default implementor that creates the execution result. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodPostDropDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodPostMoveDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodPostRenameDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodPurgeHealthState()Removes the health data for a specified tree/subtree.
Public methodPurgeHealthState(SfcQueryExpression)Removes the health data for a specified tree/subtree.
Public methodRefreshRefreshes the object's properties by reading them from the server. (Inherited from SfcInstance.)
Protected methodRenameImplDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodRepairPolicyAutomationThe RepairPolicyAutomation method recreates all necessary artifacts for all automated policies.
Protected methodResetKeyDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public methodScriptAlterAlters the script associated with this policy store.
Public methodSerializeSerializes the instance to XML. (Inherited from SfcInstance.)
Public methodStartSerializationUpgradeStarts a serialization upgrade.
Public methodSubscribeToPolicyCategorySubscribes the policy store to the category specified by the policyCategory and target parameters.
Public methodToStringReturns the PolicyStore object as a string value. (Overrides SfcInstance.ToString().)
Public methodUnsubscribeFromPolicyCategoryUnsubscribes the policy store from the category specified by the policyCategory and target parameters.
Protected methodUpdateUIPropertyStateDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Protected methodValidateIndicates the basic child object's validation. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Top

  NameDescription
Protected eventpropertyChangedDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public eventPropertyChangedCLS-compliant event for property changes. (Inherited from SfcInstance.)
Protected eventpropertyMetadataChangedDo not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SfcInstance.)
Public eventPropertyMetadataChangedCLS-compliant event for property metadata changes. (Inherited from SfcInstance.)
Top

  NameDescription
Explicit interface implemetationPrivate methodISfcDomain.GetExecutionEngineGets a new ISfcExecutionEngine object.
Explicit interface implemetationPrivate methodISfcDomain.GetKeyGets a new SfcKey of type determined by the name property of urnFragment parameter.
Explicit interface implemetationPrivate methodISfcDomain.GetTypeGets a Type object specified by the typeName parameter.
Explicit interface implemetationPrivate methodISfcDomain.GetTypeMetadataGets a T:Microsoft.SqlServer.Management.Sdk.Sfc.SfcTypeMetadata object identified by the typeName parameter.
Explicit interface implemetationPrivate methodISfcDomain.UseSfcStateManagementUse the SFC state management to return true.
Explicit interface implemetationPrivate propertyISfcDomainLite.DomainInstanceNameGets the name of the domain instance.
Explicit interface implemetationPrivate propertyISfcDomainLite.DomainNameGets the domain name.
Explicit interface implemetationPrivate methodISfcDomainLite.GetLogicalVersionIndicates the logical version to get in the domain.
Explicit interface implemetationPrivate propertyISfcHasConnection.ConnectionContextGets the connection context.
Explicit interface implemetationPrivate methodISfcHasConnection.GetConnection()Indicates the connection to get.
Explicit interface implemetationPrivate methodISfcHasConnection.GetConnection(SfcObjectQueryMode)Indicates the connection to get using the SfcObjectQuery mode.
Explicit interface implemetationPrivate methodISfcHasConnection.SetConnectionIndicates the connection to set.
Explicit interface implemetationPrivate methodISfcValidate.ValidateValidates the Policy objects in the PolicyStore.
Top

Using the PolicyStore object you can:

  • Hold a connection to the whole object model.

  • Access the collection of policies, conditions, policy groups, subscriptions and facets that are immediate children of the PolicyStore object.

  • Review the policy execution history.

  • Review applicable policies for a given target type.

  • Subscribe to policies.

  • Serialize and deserialize policies.

  • Create a policy from a facet.

NoteNote

The PolicyStore class implements ISfcDomain, which specifies the connection point to any object domain defined using the Microsoft SFC.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft