Compartir a través de


Clase PolicyStore

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

Jerarquía de herencia

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

Espacio de nombres:  Microsoft.SqlServer.Management.Dmf
Ensamblado:  Microsoft.SqlServer.Dmf (en Microsoft.SqlServer.Dmf.dll)

Sintaxis

'Declaración
<TypeConverterAttribute(GetType(LocalizableTypeConverter))> _
<StrongNameIdentityPermissionAttribute(SecurityAction.LinkDemand, PublicKey := "0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8")> _
Public NotInheritable Class PolicyStore _
    Inherits SfcInstance _
    Implements ISfcAlterable, IAlterable, ISfcDomain, ISfcDomainLite,  _
    ISfcHasConnection, ISfcSerializableUpgrade, ISfcValidate
'Uso
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

El tipo PolicyStore expone los siguientes miembros.

Constructores

  Nombre Descripción
Método público PolicyStore() Initializes a new instance of the PolicyStore class.
Método público PolicyStore(SfcConnection) Initializes a new instance of the PolicyStore class.

Arriba

Propiedades

  Nombre Descripción
Propiedad protegida AbstractIdentityKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Propiedad pública Conditions Represents a collection of Condition objects. Each Condition object represents a policy-based Management condition.
Propiedad pública Enabled Gets or sets whether the policy store is enabled.
Propiedad públicaMiembro estático Facets Represents a collection of FacetInfo objects. Each FacetInfo object represents a policy-based Management registered facet.
Propiedad pública HistoryRetentionInDays Gets or sets the number of days the policy store retains history.
Propiedad pública IdentityKey Gets the identity key.
Propiedad pública LogOnSuccess Gets or sets whether log-on succeeded.
Propiedad pública Metadata Returns metadata about the instance and its domain. (Se hereda de SfcInstance.)
Propiedad pública Name Gets the name of the policy store.
Propiedad pública ObjectSets Represents a collection of ObjectSet objects. Each ObjectSet object represents a policy-based Management object set.
Propiedad pública Parent Gets or sets the instance parent via the keychain. (Se hereda de SfcInstance.)
Propiedad pública Policies Represents a collection of Policy objects. Each Policy object represents a policy-based Management policy.
Propiedad pública PolicyCategories Represents a collection of PolicyCategory objects. Each PolicyCategory object represents a policy-based Management policy category.
Propiedad pública PolicyCategorySubscriptions Represents a collection of PolicyCategorySubscription objects. Each PolicyCategorySubscription object represents a policy-based Management policy category subscription.
Propiedad pública Properties Returns a collection instance properties. (Se hereda de SfcInstance.)
Propiedad pública SqlStoreConnection Gets or sets the SqlStoreConnection object.
Propiedad protegida State Returns the state of the SfcInstance object. (Se hereda de SfcInstance.)
Propiedad pública Urn Returns the uniform resource name of the SfcInstance object. (Se hereda de SfcInstance.)

Arriba

Métodos

  Nombre Descripción
Método público Alter Alters a previously created PolicyStore object.
Método protegido CreateIdentityKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público CreatePolicyFromFacet(SfcQueryExpression, String, String, String) Creates new policy from an SfcQueryExpression object and names.
Método público CreatePolicyFromFacet(Object, String, String, String, XmlWriter) Creates new policy from an Object and an XmlWriter object.
Método público CreatePolicyFromFacet(SfcQueryExpression, String, String, String, XmlWriter) Creates new policy from an SfcQueryExpression object and an XmlWriter object.
Método público DeserializePolicy Deserializes a single policy and its associated condition from the specified XML reader into the policy store.
Método público Discover Discovers dependency relationships for the specified sink. (Invalida SfcInstance.Discover(ISfcDependencyDiscoveryObjectSink).)
Método público EnumApplicablePolicies Enumerates policy items specified by an SfcQueryExpression object.
Método público EnumApplicablePolicyCategories Enumerates conditions specified by an SfcQueryExpression object.
Método público EnumConditionsOnFacet(String) Returns a list of conditions that are associated with the specified facet.
Método público EnumConditionsOnFacet(String, PolicyStore.EnumerationMode) Enumerates a StringCollection of conditions.
Método públicoMiembro estático EnumDomainFacets Enumerates facets in a domain.
Método público EnumPoliciesOnFacet(String) Returns a list of policies associated with the specified facet.
Método público EnumPoliciesOnFacet(String, PolicyStore.EnumerationMode) Enumerates policy items on a facet.
Método público EnumPolicyCategories Returns an enumerated list of policy category information.
Método público EnumRootConditions Returns a list of root conditions for the specified type.
Método públicoMiembro estático EnumRootFacets Returns a list of root facets for the specified type.
Método público EnumTargetSetConditions(Type) Returns a list of target set conditions for the specified type.
Método público EnumTargetSetConditions(Type, PolicyStore.EnumerationMode) Enumerates conditions on the target.
Método público Equals (Se hereda de Object.)
Método público EraseSystemHealthPhantomRecords Deletes system health phantom records specified by a SfcQueryExpression.
Método público GetAggregatedHealthState Deletes system health phantom records specified by a SfcQueryExpression.
Método protegido GetChildCollection No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público GetDomain No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público GetHashCode (Se hereda de Object.)
Método público GetPropertySet Returns the set of properties for the SfcInstance object. (Se hereda de SfcInstance.)
Método público GetType (Se hereda de Object.)
Método protegido GetTypeMetadataImpl Indicates the domains that override by returning the right TypeMetadata class directly. No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público ImportPolicy Imports a single policy and its associated condition from the given XML reader into the policy store.
Método protegido InitializeUIPropertyState No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público MarkSystemObject Sets the name of a Policy, Condition, or ObjectSet.
Método protegido OnPropertyMetadataChanges Invoked whenever the effective value of any SfcInstance metadata is updated. (Se hereda de SfcInstance.)
Método protegido OnPropertyValueChanges Invoked whenever the effective value of any SfcInstance property is updated. (Se hereda de SfcInstance.)
Método público PurgeHealthState() Removes the health data for a specified tree/subtree.
Método público PurgeHealthState(SfcQueryExpression) Removes the health data for a specified tree/subtree.
Método público Refresh Refreshes the object's properties by reading them from the server. (Se hereda de SfcInstance.)
Método público RepairPolicyAutomation The RepairPolicyAutomation method recreates all necessary artifacts for all automated policies.
Método protegido ResetKey No haga referencia directamente a este miembro en el código. Admite la infraestructura de SQL Server. (Se hereda de SfcInstance.)
Método público ScriptAlter Alters the script associated with this policy store.
Método público Serialize Serializes the instance to XML. (Se hereda de SfcInstance.)
Método público StartSerializationUpgrade Starts a serialization upgrade.
Método público SubscribeToPolicyCategory Subscribes the policy store to the category specified by the policyCategory and target parameters.
Método público ToString Returns the PolicyStore object as a string value. (Invalida SfcInstance.ToString().)
Método público UnsubscribeFromPolicyCategory Unsubscribes the policy store from the category specified by the policyCategory and target parameters.

Arriba

Eventos

  Nombre Descripción
Evento público PropertyChanged CLS-compliant event for property changes. (Se hereda de SfcInstance.)
Evento público PropertyMetadataChanged CLS-compliant event for property metadata changes. (Se hereda de SfcInstance.)

Arriba

Implementaciones de interfaces explícitas

  Nombre Descripción
Implementación de interfaces explícitasMétodo privado ISfcDomain.GetExecutionEngine Gets a new ISfcExecutionEngine object.
Implementación de interfaces explícitasMétodo privado ISfcDomain.GetKey Gets a new SfcKey of type determined by the name property of urnFragment parameter.
Implementación de interfaces explícitasMétodo privado ISfcDomain.GetType Gets a Type object specified by the typeName parameter.
Implementación de interfaces explícitasMétodo privado ISfcDomain.GetTypeMetadata Gets a T:Microsoft.SqlServer.Management.Sdk.Sfc.SfcTypeMetadata object identified by the typeName parameter.
Implementación de interfaces explícitasMétodo privado ISfcDomain.UseSfcStateManagement Use the SFC state management to return true.
Implementación de interfaces explícitasPropiedad privada ISfcDomainLite.DomainInstanceName Gets the name of the domain instance.
Implementación de interfaces explícitasPropiedad privada ISfcDomainLite.DomainName Gets the domain name.
Implementación de interfaces explícitasMétodo privado ISfcDomainLite.GetLogicalVersion Indicates the logical version to get in the domain.
Implementación de interfaces explícitasPropiedad privada ISfcHasConnection.ConnectionContext Gets the connection context.
Implementación de interfaces explícitasMétodo privado ISfcHasConnection.GetConnection() Indicates the connection to get.
Implementación de interfaces explícitasMétodo privado ISfcHasConnection.GetConnection(SfcObjectQueryMode) Indicates the connection to get using the SfcObjectQuery mode.
Implementación de interfaces explícitasMétodo privado ISfcHasConnection.SetConnection Indicates the connection to set.
Implementación de interfaces explícitasMétodo privado ISfcValidate.Validate Validates the Policy objects in the PolicyStore.

Arriba

Comentarios

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.

[!NOTA]

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

Seguridad para subprocesos

Cualquier miembro público static (Shared en Visual Basic) de este tipo es seguro para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Vea también

Referencia

Espacio de nombres Microsoft.SqlServer.Management.Dmf