# ContentKeyPolicyPutSchema

## Properties

### Key Policy

#### Properties

- **description** (string, Optional)  
  A description for the Policy.

- **fairPlayAmsCompatibility** (boolean, Optional)  
  FairPlay AMS compatibility enabled.

- **options** (list of objects, Required)  
  The Key Policy options.

#### Configuration

- **configuration** (object, Required)  
  The key delivery configuration.

##### Discriminated by `@odata.type`. Select one variant:

1. **Microsoft.Media.ContentKeyPolicyClearKeyConfiguration** (object)  
   Represents a configuration for non-DRM keys.

- **@odata.type** (string, Required)  
     Discriminator for derived types.

2. **Microsoft.Media.ContentKeyPolicyFairPlayConfiguration** (object)  
   Specifies a configuration for FairPlay licenses.

- **@odata.type** (string, Required)  
     Discriminator for derived types.  
   - **ask** (string or null, Required, format: byte)  
     FairPlay Application Secret key (base64 encoded).
   - **fairPlayPfx** (string or null, Required)  
     Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
   - **fairPlayPfxPassword** (string or null, Required)  
     Password encrypting FairPlay certificate in PKCS 12 (pfx) format.

- **offlineRentalConfiguration** (object, Optional)  
  Offline rental policy

- **playbackDurationSeconds** (integer, Required)  
     Playback duration.
   - **storageDurationSeconds** (integer, Required)  
     Storage duration.
   - **rentalAndLeaseKeyType** (enum, Required)  
     Allowed values: Unknown, Undefined, DualExpiry, Persistent, Unlimited, PersistentLimited.
   - **rentalDuration** (integer, Required)  
     Rental duration (must be >= 0).

3. **Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration** (object)  
   Specifies a configuration for PlayReady licenses.

- **@odata.type** (string, Required)  
     Discriminator for derived types.
   - **licenses** (list of objects, Required)  
     The PlayReady licenses.

#### Properties for PlayReady Licenses

- **allowTestDevices** (boolean, Required)  
  Flag for test device license access.
- **beginDate** (string, Optional, format: date-time)  
  License start date.
- **contentKeyLocation** (object, Required)  
  Content key location.

##### Discriminated by `@odata.type`. Select one variant:

1. **Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader**  
   Content key ID in the PlayReady header.
2. **Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier**  
   Content key ID specified in configuration.

- **keyId** (string or null, Required, format: uuid)  
  Content key ID.
- **contentType** (enum, Required)  
  Allowed values: Unknown, Unspecified, UltraVioletDownload, UltraVioletStreaming.
- **expirationDate** (string, Optional, format: date-time)  
  License expiration date.
- **gracePeriod** (string, Optional, format: duration)  
  License grace period.
- **licenseType** (enum, Required)  
  Allowed values: Unknown, NonPersistent, Persistent.
- **playRight** (object, Optional)  
  License PlayRight.

##### Properties for PlayRight

- **agcAndColorStripeRestriction** (integer, Optional, 0 to 3)  
  AGC and Color Stripe configuration.
- **allowPassingVideoContentToUnknownOutput** (enum, Required)  
  Output handling settings.
  Allowed values: Unknown, NotAllowed, Allowed, AllowedWithVideoConstriction.
- **analogVideoOpl** (integer, Optional)  
  Output protection level for compressed digital audio.
- **compressedDigitalAudioOpl** (integer, Optional)  
  Output protection levels.
- **uncompressedDigitalAudioOpl** (integer, Optional)
  Output protection level for uncompressed video.
- **firstPlayExpiration** (string, Optional, format: duration)
  License validity after first use.
- **imageConstraintForAnalogComponentVideoRestriction** (boolean, Required)  
  Image Constraint for Analog Component Video.

### Additional Configurations

- **Microsoft.Media.ContentKeyPolicyUnknownConfiguration** (object)
   Represents a configuration that is unavailable in the current API version.

- **Microsoft.Media.ContentKeyPolicyWidevineConfiguration** (object)
   Specifies a configuration for Widevine licenses.
