Condividi tramite


ArmResourcesPolicyModelFactory.PolicyParameterMetadata Method

Definition

The definition of a parameter that can be provided to the policy.

public static Azure.ResourceManager.Resources.Policy.Models.PolicyParameterMetadata PolicyParameterMetadata(Azure.ResourceManager.Resources.Policy.Models.PolicyParameterType? type = default, System.Collections.Generic.IEnumerable<BinaryData> allowedValues = default, BinaryData defaultValue = default, BinaryData schema = default, Azure.ResourceManager.Resources.Policy.Models.PolicyParameterMetadataProperties metadata = default);
static member PolicyParameterMetadata : Nullable<Azure.ResourceManager.Resources.Policy.Models.PolicyParameterType> * seq<BinaryData> * BinaryData * BinaryData * Azure.ResourceManager.Resources.Policy.Models.PolicyParameterMetadataProperties -> Azure.ResourceManager.Resources.Policy.Models.PolicyParameterMetadata
Public Shared Function PolicyParameterMetadata (Optional type As Nullable(Of PolicyParameterType) = Nothing, Optional allowedValues As IEnumerable(Of BinaryData) = Nothing, Optional defaultValue As BinaryData = Nothing, Optional schema As BinaryData = Nothing, Optional metadata As PolicyParameterMetadataProperties = Nothing) As PolicyParameterMetadata

Parameters

type
Nullable<PolicyParameterType>

The data type of the parameter.

allowedValues
IEnumerable<BinaryData>

The allowed values for the parameter.

defaultValue
BinaryData

The default value for the parameter if no value is provided.

schema
BinaryData

Provides validation of parameter inputs during assignment using a self-defined JSON schema. This property is only supported for object-type parameters and follows the Json.NET Schema 2019-09 implementation. You can learn more about using schemas at https://json-schema.org/ and test draft schemas at https://www.jsonschemavalidator.net/.

metadata
PolicyParameterMetadataProperties

General metadata for the parameter.

Returns

A new PolicyParameterMetadata instance for mocking.

Applies to