Поделиться через


Класс PolicyStore

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

Иерархия наследования

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

Пространство имен:  Microsoft.SqlServer.Management.Dmf
Сборка:  Microsoft.SqlServer.Dmf (в Microsoft.SqlServer.Dmf.dll)

Синтаксис

'Декларация
<TypeConverterAttribute(GetType(LocalizableTypeConverter))> _
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Public NotInheritable Class PolicyStore _
    Inherits SfcInstance _
    Implements ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite,  _
    ISfcHasConnection, ISfcSerializableUpgrade, ISfcValidate
'Применение
Dim instance As PolicyStore
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public sealed class PolicyStore : SfcInstance, 
    ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, 
    ISfcSerializableUpgrade, ISfcValidate
[TypeConverterAttribute(typeof(LocalizableTypeConverter))]
[StrongNameIdentityPermissionAttribute(SecurityAction::LinkDemand, PublicKey = L"0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")]
public ref class PolicyStore sealed : public SfcInstance, 
    ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, 
    ISfcSerializableUpgrade, ISfcValidate
[<SealedAttribute>]
[<TypeConverterAttribute(typeof(LocalizableTypeConverter))>]
[<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey = "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")>]
type PolicyStore =  
    class
        inherit SfcInstance
        interface ISfcAlterable
        interface IAlterable
        interface ISfcDomain
        interface ISfcDomainLite
        interface ISfcHasConnection
        interface ISfcSerializableUpgrade
        interface ISfcValidate
    end
public final class PolicyStore extends SfcInstance implements ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite, ISfcHasConnection, ISfcSerializableUpgrade, ISfcValidate

Тип PolicyStore обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод PolicyStore() () () () Initializes a new instance of the PolicyStore class.
Открытый метод PolicyStore(SfcConnection) Initializes a new instance of the PolicyStore class.

В начало

Свойства

  Имя Описание
Защищенное свойство AbstractIdentityKey Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытое свойство Conditions Represents a collection of Condition objects. Each Condition object represents a policy-based Management condition.
Открытое свойство Enabled Gets or sets whether the policy store is enabled.
Открытое свойствоСтатический элемент Facets Represents a collection of FacetInfo objects. Each FacetInfo object represents a policy-based Management registered facet.
Открытое свойство HistoryRetentionInDays Gets or sets the number of days the policy store retains history.
Открытое свойство IdentityKey Gets the identity key.
Открытое свойство LogOnSuccess Gets or sets whether log-on succeeded.
Открытое свойство Metadata Returns metadata about the instance and its domain. (Производный от SfcInstance.)
Открытое свойство Name Gets the name of the policy store.
Открытое свойство ObjectSets Represents a collection of ObjectSet objects. Each ObjectSet object represents a policy-based Management object set.
Открытое свойство Parent Gets or sets the instance parent via the keychain. (Производный от SfcInstance.)
Открытое свойство Policies Represents a collection of Policy objects. Each Policy object represents a policy-based Management policy.
Открытое свойство PolicyCategories Represents a collection of PolicyCategory objects. Each PolicyCategory object represents a policy-based Management policy category.
Открытое свойство PolicyCategorySubscriptions Represents a collection of PolicyCategorySubscription objects. Each PolicyCategorySubscription object represents a policy-based Management policy category subscription.
Открытое свойство Properties Returns a collection instance properties. (Производный от SfcInstance.)
Защищенное свойство PropertyStorageProvider Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытое свойство SqlStoreConnection Gets or sets the SqlStoreConnection object.
Защищенное свойство State Returns the state of the SfcInstance object. (Производный от SfcInstance.)
Открытое свойство Urn Returns the uniform resource name of the SfcInstance object. (Производный от SfcInstance.)

В начало

Методы

  Имя Описание
Открытый метод Alter Alters a previously created PolicyStore object.
Защищенный метод AlterImpl Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод CheckObjectCreated Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод CheckObjectState Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод CreateIdentityKey Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод CreateImpl Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод CreatePolicyFromFacet(SfcQueryExpression, String, String, String) Creates new policy from an SfcQueryExpression object and names.
Открытый метод CreatePolicyFromFacet(Object, String, String, String, XmlWriter) Creates new policy from an Object and an XmlWriter object.
Открытый метод CreatePolicyFromFacet(SfcQueryExpression, String, String, String, XmlWriter) Creates new policy from an SfcQueryExpression object and an XmlWriter object.
Открытый метод DeserializePolicy Deserializes a single policy and its associated condition from the specified XML reader into the policy store.
Открытый метод Discover Discovers dependency relationships for the specified sink. (Переопределяет SfcInstance. . :: . .Discover(ISfcDependencyDiscoveryObjectSink).)
Защищенный метод DropImpl Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод EnumApplicablePolicies Enumerates policy items specified by an SfcQueryExpression object.
Открытый метод EnumApplicablePolicyCategories Enumerates conditions specified by an SfcQueryExpression object.
Открытый метод EnumConditionsOnFacet(String) Returns a list of conditions that are associated with the specified facet.
Открытый метод EnumConditionsOnFacet(String, PolicyStore. . :: . .EnumerationMode) Enumerates a StringCollection of conditions.
Открытый методСтатический элемент EnumDomainFacets Enumerates facets in a domain.
Открытый метод EnumPoliciesOnFacet(String) Returns a list of policies associated with the specified facet.
Открытый метод EnumPoliciesOnFacet(String, PolicyStore. . :: . .EnumerationMode) Enumerates policy items on a facet.
Открытый метод EnumPolicyCategories Returns an enumerated list of policy category information.
Открытый метод EnumRootConditions Returns a list of root conditions for the specified type.
Открытый методСтатический элемент EnumRootFacets Returns a list of root facets for the specified type.
Открытый метод EnumTargetSetConditions(Type) Returns a list of target set conditions for the specified type.
Открытый метод EnumTargetSetConditions(Type, PolicyStore. . :: . .EnumerationMode) Enumerates conditions on the target.
Открытый метод Equals (Производный от Object.)
Открытый метод EraseSystemHealthPhantomRecords Deletes system health phantom records specified by a SfcQueryExpression.
Защищенный метод Finalize (Производный от Object.)
Открытый метод GetAggregatedHealthState Deletes system health phantom records specified by a SfcQueryExpression.
Защищенный метод GetChildCollection Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод GetDomain Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод GetHashCode (Производный от Object.)
Открытый метод GetPropertySet Returns the set of properties for the SfcInstance object. (Производный от SfcInstance.)
Открытый метод GetType (Производный от Object.)
Защищенный метод GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод ImportPolicy Imports a single policy and its associated condition from the given XML reader into the policy store.
Защищенный метод InitializeUIPropertyState Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод MarkForDropImpl Returns a value that indicates the existing objects to be dropped. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод MarkRootAsConnected Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод MarkSystemObject Sets the name of a Policy, Condition, or ObjectSet.
Защищенный метод MemberwiseClone (Производный от Object.)
Защищенный метод MoveImpl Indicates the new parent object to move in an instance. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (Производный от SfcInstance.)
Защищенный метод OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (Производный от SfcInstance.)
Защищенный метод PostAlter Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод PostCreate Indicates the default implementor that creates the execution result. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод PostDrop Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод PostMove Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод PostRename Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод PurgeHealthState() () () () Removes the health data for a specified tree/subtree.
Открытый метод PurgeHealthState(SfcQueryExpression) Removes the health data for a specified tree/subtree.
Открытый метод Refresh Refreshes the object's properties by reading them from the server. (Производный от SfcInstance.)
Защищенный метод RenameImpl Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод RepairPolicyAutomation The RepairPolicyAutomation method recreates all necessary artifacts for all automated policies.
Защищенный метод ResetKey Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытый метод ScriptAlter Alters the script associated with this policy store.
Открытый метод Serialize Serializes the instance to XML. (Производный от SfcInstance.)
Открытый метод StartSerializationUpgrade Starts a serialization upgrade.
Открытый метод SubscribeToPolicyCategory Subscribes the policy store to the category specified by the policyCategory and target parameters.
Открытый метод ToString Returns the PolicyStore object as a string value. (Переопределяет SfcInstance. . :: . .ToString() () () ().)
Открытый метод UnsubscribeFromPolicyCategory Unsubscribes the policy store from the category specified by the policyCategory and target parameters.
Защищенный метод UpdateUIPropertyState Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Защищенный метод Validate Indicates the basic child object's validation. Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)

В начало

События

  Имя Описание
Защищенное событие propertyChanged Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытое событие PropertyChanged CLS-compliant event for property changes. (Производный от SfcInstance.)
Защищенное событие propertyMetadataChanged Не ссылайтесь на этот элемент непосредственно из кода. Он поддерживает работу инфраструктуры SQL Server. (Производный от SfcInstance.)
Открытое событие PropertyMetadataChanged CLS-compliant event for property metadata changes. (Производный от SfcInstance.)

В начало

Явные реализации интерфейса

  Имя Описание
Явная реализация интерфейсаЗакрытый метод ISfcDomain. . :: . .GetExecutionEngine Gets a new ISfcExecutionEngine object.
Явная реализация интерфейсаЗакрытый метод ISfcDomain. . :: . .GetKey Gets a new SfcKey of type determined by the name property of urnFragment parameter.
Явная реализация интерфейсаЗакрытый метод ISfcDomain. . :: . .GetType Gets a Type object specified by the typeName parameter.
Явная реализация интерфейсаЗакрытый метод ISfcDomain. . :: . .GetTypeMetadata Gets a T:Microsoft.SqlServer.Management.Sdk.Sfc.SfcTypeMetadata object identified by the typeName parameter.
Явная реализация интерфейсаЗакрытый метод ISfcDomain. . :: . .UseSfcStateManagement Use the SFC state management to return true.
Явная реализация интерфейсаЗакрытое свойство ISfcDomainLite. . :: . .DomainInstanceName Gets the name of the domain instance.
Явная реализация интерфейсаЗакрытое свойство ISfcDomainLite. . :: . .DomainName Gets the domain name.
Явная реализация интерфейсаЗакрытый метод ISfcDomainLite. . :: . .GetLogicalVersion Indicates the logical version to get in the domain.
Явная реализация интерфейсаЗакрытое свойство ISfcHasConnection. . :: . .ConnectionContext Gets the connection context.
Явная реализация интерфейсаЗакрытый метод ISfcHasConnection. . :: . .GetConnection() () () () Indicates the connection to get.
Явная реализация интерфейсаЗакрытый метод ISfcHasConnection. . :: . .GetConnection(SfcObjectQueryMode) Indicates the connection to get using the SfcObjectQuery mode.
Явная реализация интерфейсаЗакрытый метод ISfcHasConnection. . :: . .SetConnection Indicates the connection to set.
Явная реализация интерфейсаЗакрытый метод ISfcValidate. . :: . .Validate Validates the Policy objects in the PolicyStore.

В начало

Замечания

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.

ПримечаниеПримечание

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

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.