# ContentKeyPolicyProperties

## object

The properties of the Content Key Policy.

### created  
string  
Optional  
format: date-time  
The creation date of the Policy

### description  
string  
Optional  
0-1024 characters  
A description for the Policy.

### fairPlayAmsCompatibility  
boolean  
Optional  
FairPlay AMS compatibility enabled.

### lastModified  
string  
Optional  
format: date-time  
The last modified date of the Policy

### options  
list of objects [ContentKeyPolicyOption](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyoption)  
Required  
The Key Policy options.

#### configuration  
object  
Required  
The key delivery configuration.

**Show 5 variants**  
**Hide 5 variants**

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

### #Microsoft.Media.ContentKeyPolicyClearKeyConfiguration  
object  
[ContentKeyPolicyClearKeyConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyclearkeyconfiguration)  
Represents a configuration for non-DRM keys.

#### @odata.type  
string  
Required  
The discriminator for derived types.

### #Microsoft.Media.ContentKeyPolicyFairPlayConfiguration  
object  
[ContentKeyPolicyFairPlayConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyfairplayconfiguration)  
Specifies a configuration for FairPlay licenses.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### ask  
string or null  
Required  
format: byte  
The key that must be used as FairPlay Application Secret key. This needs to be base64 encoded.

##### fairPlayPfx  
string or null  
Required  
The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).

##### fairPlayPfxPassword  
string or null  
Required  
The password encrypting FairPlay certificate in PKCS 12 (pfx) format.

#### offlineRentalConfiguration  
object [ContentKeyPolicyFairPlayOfflineRentalConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyfairplayofflinerentalconfiguration)  
Optional  
Offline rental policy

**Show 2 properties**  
**Hide 2 properties**

##### playbackDurationSeconds  
integer  
Required  
Playback duration

##### storageDurationSeconds  
integer  
Required  
Storage duration

##### rentalAndLeaseKeyType  
enum  
Required  
The rental and lease key type.

Allowed values: Unknown, Undefined, DualExpiry, Persistent, Unlimited, PersistentLimited

##### rentalDuration  
integer  
Required  
The rental duration. Must be greater than or equal to 0.

### #Microsoft.Media.ContentKeyPolicyPlayReadyConfiguration  
object  
[ContentKeyPolicyPlayReadyConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadyconfiguration)  
Specifies a configuration for PlayReady licenses.

#### @odata.type  
string  
Required  
The discriminator for derived types.

#### licenses  
list of objects [ContentKeyPolicyPlayReadyLicense](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadylicense)  
Required  
The PlayReady licenses.

**Show 11 properties**  
**Hide 11 properties**

##### allowTestDevices  
boolean  
Required  
A flag indicating whether test devices can use the license.

##### beginDate  
string  
Optional  
format: date-time  
The begin date of license

##### contentKeyLocation  
object  
Required  
The content key location.

**Show 2 variants**  
**Hide 2 variants**

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

### #Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader  
object  
[ContentKeyPolicyPlayReadyContentEncryptionKeyFromHeader](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadycontentencryptionkeyfromheader)  
Specifies that the content key ID is in the PlayReady header.

#### @odata.type  
string  
Required  
The discriminator for derived types.

### #Microsoft.Media.ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier  
object  
[ContentKeyPolicyPlayReadyContentEncryptionKeyFromKeyIdentifier](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadycontentencryptionkeyfromkeyidentifier)  
Specifies that the content key ID is specified in the PlayReady configuration.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### keyId  
string or null  
Required  
format: uuid  
The content key ID.

##### contentType  
enum  
Required  
The PlayReady content type.

Allowed values: Unknown, Unspecified, UltraVioletDownload, UltraVioletStreaming

##### expirationDate  
string  
Optional  
format: date-time  
The expiration date of license.

##### gracePeriod  
string  
Optional  
format: duration  
The grace period of license.

##### licenseType  
enum  
Required  
The license type.

Allowed values: Unknown, NonPersistent, Persistent

##### playRight  
object [ContentKeyPolicyPlayReadyPlayRight](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadyplayright)  
Optional  
The license PlayRight

**Show 13 properties**  
**Hide 13 properties**

##### agcAndColorStripeRestriction  
integer  
Optional  
0 to 3  
Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.

##### allowPassingVideoContentToUnknownOutput  
enum  
Required  
Configures Unknown output handling settings of the license.

Allowed values: Unknown, NotAllowed, Allowed, AllowedWithVideoConstriction

##### analogVideoOpl  
integer  
Optional  
Specifies the output protection level for compressed digital audio.

##### compressedDigitalAudioOpl  
integer  
Optional  
Specifies the output protection level for compressed digital audio.

##### compressedDigitalVideoOpl  
integer  
Optional  
Specifies the output protection level for compressed digital video.

##### digitalVideoOnlyContentRestriction  
boolean  
Required  
Enables the Image Constraint For Analog Component Video Restriction in the license.

##### explicitAnalogTelevisionOutputRestriction  
object [ContentKeyPolicyPlayReadyExplicitAnalogTelevisionRestriction](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyplayreadyexplicitanalogtelevisionrestriction)  
Optional  
Configures the Explicit Analog Television Output Restriction in the license. Configuration data must be between 0 and 3 inclusive.

**Show 2 properties**  
**Hide 2 properties**

###### bestEffort  
boolean  
Required  
Indicates whether this restriction is enforced on a Best Effort basis.

###### configurationData  
integer  
Required  
0 to 3  
Configures the restriction control bits. Must be between 0 and 3 inclusive.

##### firstPlayExpiration  
string  
Optional  
format: duration  
The amount of time that the license is valid after the license is first used to play content.

##### imageConstraintForAnalogComponentVideoRestriction  
boolean  
Required  
Enables the Image Constraint For Analog Component Video Restriction in the license.

##### imageConstraintForAnalogComputerMonitorRestriction  
boolean  
Required  
Enables the Image Constraint For Analog Component Video Restriction in the license.

##### scmsRestriction  
integer  
Optional  
0 to 3  
Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.

##### uncompressedDigitalAudioOpl  
integer  
Optional  
Specifies the output protection level for uncompressed digital audio.

##### uncompressedDigitalVideoOpl  
integer  
Optional  
Specifies the output protection level for uncompressed digital video.

##### relativeBeginDate  
string  
Optional  
format: duration  
The relative begin date of license.

##### relativeExpirationDate  
string  
Optional  
format: duration  
The relative expiration date of license.

##### securityLevel  
enum  
Optional  
The security level.

Allowed values: Unknown, SL150, SL2000, SL3000

##### responseCustomData  
string  
Optional  
The custom response data.

### #Microsoft.Media.ContentKeyPolicyUnknownConfiguration  
object  
[ContentKeyPolicyUnknownConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyunknownconfiguration)  
Represents a ContentKeyPolicyConfiguration that is unavailable in the current API version.

#### @odata.type  
string  
Required  
The discriminator for derived types.

### #Microsoft.Media.ContentKeyPolicyWidevineConfiguration  
object  
[ContentKeyPolicyWidevineConfiguration](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicywidevineconfiguration)  
Specifies a configuration for Widevine licenses.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### widevineTemplate  
string  
Required  
The Widevine template.

### names  
string  
Optional  
The Policy Option description.

### policyOptionId  
string  
Optional  
format: uuid  
The legacy Policy Option ID.

### restriction  
object  
Required  
The requirements that must be met to deliver keys with this configuration

**Show 3 variants**  
**Hide 3 variants**

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

### #Microsoft.Media.ContentKeyPolicyOpenRestriction  
object  
[ContentKeyPolicyOpenRestriction](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyopenrestriction)  
Represents an open restriction. License or key will be delivered on every request.

#### @odata.type  
string  
Required  
The discriminator for derived types.

### #Microsoft.Media.ContentKeyPolicyTokenRestriction  
object  
[ContentKeyPolicyTokenRestriction](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicytokenrestriction)  
Represents a token restriction. Provided token must match these requirements for successful license or key delivery.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### alternateVerificationKeys  
list of objects  
Optional  
A list of alternative verification keys.

**Show 3 variants**  
**Hide 3 variants**

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

### #Microsoft.Media.ContentKeyPolicyRsaTokenKey  
object  
[ContentKeyPolicyRsaTokenKey](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyrsatokenkey)  
Specifies a RSA key for token validation

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### exponent  
string or null  
Required  
format: byte  
The RSA Parameter exponent

##### modulus  
string or null  
Required  
format: byte  
The RSA Parameter modulus

### #Microsoft.Media.ContentKeyPolicySymmetricTokenKey  
object  
[ContentKeyPolicySymmetricTokenKey](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicysymmetrictokenkey)  
Specifies a symmetric key for token validation.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### keyValue  
string or null  
Required  
format: byte  
The key value of the key

### #Microsoft.Media.ContentKeyPolicyX509CertificateTokenKey  
object  
[ContentKeyPolicyX509CertificateTokenKey](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyx509certificatetokenkey)  
Specifies a certificate for token validation.

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### rawBody  
string or null  
Required  
format: byte  
The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)

### audience  
string  
Required  
The audience for the token.

### issuer  
string  
Required  
The token issuer.

### openIdConnectDiscoveryDocument  
string  
Optional  
The OpenID connect discovery document.

### primaryVerificationKey  
object or null  
Required  
The primary verification key.

**Show 3 variants**  
**Hide 3 variants**

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

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### exponent  
string or null  
Required  
format: byte  
The RSA Parameter exponent

##### modulus  
string or null  
Required  
format: byte  
The RSA Parameter modulus

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### keyValue  
string or null  
Required  
format: byte  
The key value of the key

#### @odata.type  
string  
Required  
The discriminator for derived types.

##### rawBody  
string or null  
Required  
format: byte  
The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET)

### requiredClaims  
list of objects [ContentKeyPolicyTokenClaim](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicytokenclaim)  
Optional  
A list of required token claims.

**Show 2 properties**  
**Hide 2 properties**

##### claimType  
string  
Optional  
Token claim type.

##### claimValue  
string  
Optional  
Token claim value.

### restrictionTokenType  
enum  
Required  
The type of token.

Allowed values: Unknown, SWT, JWT

### #Microsoft.Media.ContentKeyPolicyUnknownRestriction  
object  
[ContentKeyPolicyUnknownRestriction](https://docs.mediakind.com/api-reference/media-api/schemas/contentkeypolicyunknownrestriction)  
Represents a ContentKeyPolicyRestriction that is unavailable in the current API version.

#### @odata.type  
string  
Required  
The discriminator for derived types.

### policyId  
string  
Optional  
format: uuid  
The legacy Policy ID.
