All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.media.kotlin.ContentKeyPolicy.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.media.kotlin

import com.pulumi.azure.media.kotlin.outputs.ContentKeyPolicyPolicyOption
import com.pulumi.azure.media.kotlin.outputs.ContentKeyPolicyPolicyOption.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [ContentKeyPolicy].
 */
@PulumiTagMarker
public class ContentKeyPolicyResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ContentKeyPolicyArgs = ContentKeyPolicyArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend ContentKeyPolicyArgsBuilder.() -> Unit) {
        val builder = ContentKeyPolicyArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): ContentKeyPolicy {
        val builtJavaResource = com.pulumi.azure.media.ContentKeyPolicy(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return ContentKeyPolicy(builtJavaResource)
    }
}

/**
 * Manages a Content Key Policy.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "media-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplestoracc",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "GRS",
 * });
 * const exampleServiceAccount = new azure.media.ServiceAccount("example", {
 *     name: "examplemediaacc",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccounts: [{
 *         id: exampleAccount.id,
 *         isPrimary: true,
 *     }],
 * });
 * const exampleContentKeyPolicy = new azure.media.ContentKeyPolicy("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     mediaServicesAccountName: exampleServiceAccount.name,
 *     policyOptions: [
 *         {
 *             name: "fairPlay",
 *             fairplayConfiguration: {
 *                 ask: "bb566284cc124a21c435a92cd3c108c4",
 *                 pfx: "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx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StAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=",
 *                 pfxPassword: "password",
 *                 rentalDurationSeconds: 2249,
 *                 rentalAndLeaseKeyType: "PersistentUnlimited",
 *             },
 *             openRestrictionEnabled: true,
 *         },
 *         {
 *             name: "playReady",
 *             playreadyConfigurationLicenses: [{
 *                 allowTestDevices: true,
 *                 beginDate: "2017-10-16T18:22:53Z",
 *                 securityLevel: "SL150",
 *                 playRight: {
 *                     scmsRestriction: 2,
 *                     digitalVideoOnlyContentRestriction: false,
 *                     imageConstraintForAnalogComponentVideoRestriction: false,
 *                     imageConstraintForAnalogComputerMonitorRestriction: false,
 *                     allowPassingVideoContentToUnknownOutput: "NotAllowed",
 *                     uncompressedDigitalVideoOpl: 100,
 *                     uncompressedDigitalAudioOpl: 100,
 *                     analogVideoOpl: 150,
 *                     compressedDigitalAudioOpl: 250,
 *                     compressedDigitalVideoOpl: 400,
 *                     explicitAnalogTelevisionOutputRestriction: {
 *                         bestEffortEnforced: true,
 *                         controlBits: 3,
 *                     },
 *                 },
 *                 licenseType: "Persistent",
 *                 contentType: "UltraVioletDownload",
 *                 contentKeyLocationFromHeaderEnabled: true,
 *             }],
 *             openRestrictionEnabled: true,
 *         },
 *         {
 *             name: "clearKey",
 *             clearKeyConfigurationEnabled: true,
 *             tokenRestriction: {
 *                 issuer: "urn:issuer",
 *                 audience: "urn:audience",
 *                 tokenType: "Swt",
 *                 primarySymmetricTokenKey: "AAAAAAAAAAAAAAAAAAAAAA==",
 *                 alternateKeys: [
 *                     {
 *                         rsaTokenKeyExponent: "AQAB",
 *                         rsaTokenKeyModulus: "AQAD",
 *                     },
 *                     {
 *                         symmetricTokenKey: "BBAAAAAAAAAAAAAAAAAAAA==",
 *                     },
 *                 ],
 *             },
 *         },
 *         {
 *             name: "widevine",
 *             widevineConfigurationTemplate: JSON.stringify({
 *                 allowed_track_types: "SD_HD",
 *                 content_key_specs: [{
 *                     track_type: "SD",
 *                     security_level: 1,
 *                     required_output_protection: {
 *                         hdcp: "HDCP_V2",
 *                     },
 *                 }],
 *                 policy_overrides: {
 *                     can_play: true,
 *                     can_persist: true,
 *                     can_renew: false,
 *                 },
 *             }),
 *             openRestrictionEnabled: true,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="media-resources",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="examplestoracc",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="GRS")
 * example_service_account = azure.media.ServiceAccount("example",
 *     name="examplemediaacc",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     storage_accounts=[{
 *         "id": example_account.id,
 *         "is_primary": True,
 *     }])
 * example_content_key_policy = azure.media.ContentKeyPolicy("example",
 *     name="example",
 *     resource_group_name=example.name,
 *     media_services_account_name=example_service_account.name,
 *     policy_options=[
 *         {
 *             "name": "fairPlay",
 *             "fairplay_configuration": {
 *                 "ask": "bb566284cc124a21c435a92cd3c108c4",
 *                 "pfx": "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4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588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=",
 *                 "pfx_password": "password",
 *                 "rental_duration_seconds": 2249,
 *                 "rental_and_lease_key_type": "PersistentUnlimited",
 *             },
 *             "open_restriction_enabled": True,
 *         },
 *         {
 *             "name": "playReady",
 *             "playready_configuration_licenses": [{
 *                 "allow_test_devices": True,
 *                 "begin_date": "2017-10-16T18:22:53Z",
 *                 "security_level": "SL150",
 *                 "play_right": {
 *                     "scms_restriction": 2,
 *                     "digital_video_only_content_restriction": False,
 *                     "image_constraint_for_analog_component_video_restriction": False,
 *                     "image_constraint_for_analog_computer_monitor_restriction": False,
 *                     "allow_passing_video_content_to_unknown_output": "NotAllowed",
 *                     "uncompressed_digital_video_opl": 100,
 *                     "uncompressed_digital_audio_opl": 100,
 *                     "analog_video_opl": 150,
 *                     "compressed_digital_audio_opl": 250,
 *                     "compressed_digital_video_opl": 400,
 *                     "explicit_analog_television_output_restriction": {
 *                         "best_effort_enforced": True,
 *                         "control_bits": 3,
 *                     },
 *                 },
 *                 "license_type": "Persistent",
 *                 "content_type": "UltraVioletDownload",
 *                 "content_key_location_from_header_enabled": True,
 *             }],
 *             "open_restriction_enabled": True,
 *         },
 *         {
 *             "name": "clearKey",
 *             "clear_key_configuration_enabled": True,
 *             "token_restriction": {
 *                 "issuer": "urn:issuer",
 *                 "audience": "urn:audience",
 *                 "token_type": "Swt",
 *                 "primary_symmetric_token_key": "AAAAAAAAAAAAAAAAAAAAAA==",
 *                 "alternate_keys": [
 *                     {
 *                         "rsa_token_key_exponent": "AQAB",
 *                         "rsa_token_key_modulus": "AQAD",
 *                     },
 *                     {
 *                         "symmetric_token_key": "BBAAAAAAAAAAAAAAAAAAAA==",
 *                     },
 *                 ],
 *             },
 *         },
 *         {
 *             "name": "widevine",
 *             "widevine_configuration_template": json.dumps({
 *                 "allowed_track_types": "SD_HD",
 *                 "content_key_specs": [{
 *                     "track_type": "SD",
 *                     "security_level": 1,
 *                     "required_output_protection": {
 *                         "hdcp": "HDCP_V2",
 *                     },
 *                 }],
 *                 "policy_overrides": {
 *                     "can_play": True,
 *                     "can_persist": True,
 *                     "can_renew": False,
 *                 },
 *             }),
 *             "open_restriction_enabled": True,
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "media-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "examplestoracc",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "GRS",
 *     });
 *     var exampleServiceAccount = new Azure.Media.ServiceAccount("example", new()
 *     {
 *         Name = "examplemediaacc",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         StorageAccounts = new[]
 *         {
 *             new Azure.Media.Inputs.ServiceAccountStorageAccountArgs
 *             {
 *                 Id = exampleAccount.Id,
 *                 IsPrimary = true,
 *             },
 *         },
 *     });
 *     var exampleContentKeyPolicy = new Azure.Media.ContentKeyPolicy("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = example.Name,
 *         MediaServicesAccountName = exampleServiceAccount.Name,
 *         PolicyOptions = new[]
 *         {
 *             new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionArgs
 *             {
 *                 Name = "fairPlay",
 *                 FairplayConfiguration = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs
 *                 {
 *                     Ask = "bb566284cc124a21c435a92cd3c108c4",
 *                     Pfx = "MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D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EkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=",
 *                     PfxPassword = "password",
 *                     RentalDurationSeconds = 2249,
 *                     RentalAndLeaseKeyType = "PersistentUnlimited",
 *                 },
 *                 OpenRestrictionEnabled = true,
 *             },
 *             new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionArgs
 *             {
 *                 Name = "playReady",
 *                 PlayreadyConfigurationLicenses = new[]
 *                 {
 *                     new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs
 *                     {
 *                         AllowTestDevices = true,
 *                         BeginDate = "2017-10-16T18:22:53Z",
 *                         SecurityLevel = "SL150",
 *                         PlayRight = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs
 *                         {
 *                             ScmsRestriction = 2,
 *                             DigitalVideoOnlyContentRestriction = false,
 *                             ImageConstraintForAnalogComponentVideoRestriction = false,
 *                             ImageConstraintForAnalogComputerMonitorRestriction = false,
 *                             AllowPassingVideoContentToUnknownOutput = "NotAllowed",
 *                             UncompressedDigitalVideoOpl = 100,
 *                             UncompressedDigitalAudioOpl = 100,
 *                             AnalogVideoOpl = 150,
 *                             CompressedDigitalAudioOpl = 250,
 *                             CompressedDigitalVideoOpl = 400,
 *                             ExplicitAnalogTelevisionOutputRestriction = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs
 *                             {
 *                                 BestEffortEnforced = true,
 *                                 ControlBits = 3,
 *                             },
 *                         },
 *                         LicenseType = "Persistent",
 *                         ContentType = "UltraVioletDownload",
 *                         ContentKeyLocationFromHeaderEnabled = true,
 *                     },
 *                 },
 *                 OpenRestrictionEnabled = true,
 *             },
 *             new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionArgs
 *             {
 *                 Name = "clearKey",
 *                 ClearKeyConfigurationEnabled = true,
 *                 TokenRestriction = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs
 *                 {
 *                     Issuer = "urn:issuer",
 *                     Audience = "urn:audience",
 *                     TokenType = "Swt",
 *                     PrimarySymmetricTokenKey = "AAAAAAAAAAAAAAAAAAAAAA==",
 *                     AlternateKeys = new[]
 *                     {
 *                         new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs
 *                         {
 *                             RsaTokenKeyExponent = "AQAB",
 *                             RsaTokenKeyModulus = "AQAD",
 *                         },
 *                         new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs
 *                         {
 *                             SymmetricTokenKey = "BBAAAAAAAAAAAAAAAAAAAA==",
 *                         },
 *                     },
 *                 },
 *             },
 *             new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionArgs
 *             {
 *                 Name = "widevine",
 *                 WidevineConfigurationTemplate = JsonSerializer.Serialize(new Dictionary
 *                 {
 *                     ["allowed_track_types"] = "SD_HD",
 *                     ["content_key_specs"] = new[]
 *                     {
 *                         new Dictionary
 *                         {
 *                             ["track_type"] = "SD",
 *                             ["security_level"] = 1,
 *                             ["required_output_protection"] = new Dictionary
 *                             {
 *                                 ["hdcp"] = "HDCP_V2",
 *                             },
 *                         },
 *                     },
 *                     ["policy_overrides"] = new Dictionary
 *                     {
 *                         ["can_play"] = true,
 *                         ["can_persist"] = true,
 *                         ["can_renew"] = false,
 *                     },
 *                 }),
 *                 OpenRestrictionEnabled = true,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/media"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("media-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("examplestoracc"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("GRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleServiceAccount, err := media.NewServiceAccount(ctx, "example", &media.ServiceAccountArgs{
 * 			Name:              pulumi.String("examplemediaacc"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			StorageAccounts: media.ServiceAccountStorageAccountArray{
 * 				&media.ServiceAccountStorageAccountArgs{
 * 					Id:        exampleAccount.ID(),
 * 					IsPrimary: pulumi.Bool(true),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"allowed_track_types": "SD_HD",
 * 			"content_key_specs": []map[string]interface{}{
 * 				map[string]interface{}{
 * 					"track_type":     "SD",
 * 					"security_level": 1,
 * 					"required_output_protection": map[string]interface{}{
 * 						"hdcp": "HDCP_V2",
 * 					},
 * 				},
 * 			},
 * 			"policy_overrides": map[string]interface{}{
 * 				"can_play":    true,
 * 				"can_persist": true,
 * 				"can_renew":   false,
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		_, err = media.NewContentKeyPolicy(ctx, "example", &media.ContentKeyPolicyArgs{
 * 			Name:                     pulumi.String("example"),
 * 			ResourceGroupName:        example.Name,
 * 			MediaServicesAccountName: exampleServiceAccount.Name,
 * 			PolicyOptions: media.ContentKeyPolicyPolicyOptionArray{
 * 				&media.ContentKeyPolicyPolicyOptionArgs{
 * 					Name: pulumi.String("fairPlay"),
 * 					FairplayConfiguration: &media.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs{
 * 						Ask:                   pulumi.String("bb566284cc124a21c435a92cd3c108c4"),
 * 						Pfx:                   pulumi.String("MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1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wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A="),
 * 						PfxPassword:           pulumi.String("password"),
 * 						RentalDurationSeconds: pulumi.Int(2249),
 * 						RentalAndLeaseKeyType: pulumi.String("PersistentUnlimited"),
 * 					},
 * 					OpenRestrictionEnabled: pulumi.Bool(true),
 * 				},
 * 				&media.ContentKeyPolicyPolicyOptionArgs{
 * 					Name: pulumi.String("playReady"),
 * 					PlayreadyConfigurationLicenses: media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArray{
 * 						&media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs{
 * 							AllowTestDevices: pulumi.Bool(true),
 * 							BeginDate:        pulumi.String("2017-10-16T18:22:53Z"),
 * 							SecurityLevel:    pulumi.String("SL150"),
 * 							PlayRight: &media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs{
 * 								ScmsRestriction:                                    pulumi.Int(2),
 * 								DigitalVideoOnlyContentRestriction:                 pulumi.Bool(false),
 * 								ImageConstraintForAnalogComponentVideoRestriction:  pulumi.Bool(false),
 * 								ImageConstraintForAnalogComputerMonitorRestriction: pulumi.Bool(false),
 * 								AllowPassingVideoContentToUnknownOutput:            pulumi.String("NotAllowed"),
 * 								UncompressedDigitalVideoOpl:                        pulumi.Int(100),
 * 								UncompressedDigitalAudioOpl:                        pulumi.Int(100),
 * 								AnalogVideoOpl:                                     pulumi.Int(150),
 * 								CompressedDigitalAudioOpl:                          pulumi.Int(250),
 * 								CompressedDigitalVideoOpl:                          pulumi.Int(400),
 * 								ExplicitAnalogTelevisionOutputRestriction: &media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs{
 * 									BestEffortEnforced: pulumi.Bool(true),
 * 									ControlBits:        pulumi.Int(3),
 * 								},
 * 							},
 * 							LicenseType:                         pulumi.String("Persistent"),
 * 							ContentType:                         pulumi.String("UltraVioletDownload"),
 * 							ContentKeyLocationFromHeaderEnabled: pulumi.Bool(true),
 * 						},
 * 					},
 * 					OpenRestrictionEnabled: pulumi.Bool(true),
 * 				},
 * 				&media.ContentKeyPolicyPolicyOptionArgs{
 * 					Name:                         pulumi.String("clearKey"),
 * 					ClearKeyConfigurationEnabled: pulumi.Bool(true),
 * 					TokenRestriction: &media.ContentKeyPolicyPolicyOptionTokenRestrictionArgs{
 * 						Issuer:                   pulumi.String("urn:issuer"),
 * 						Audience:                 pulumi.String("urn:audience"),
 * 						TokenType:                pulumi.String("Swt"),
 * 						PrimarySymmetricTokenKey: pulumi.String("AAAAAAAAAAAAAAAAAAAAAA=="),
 * 						AlternateKeys: media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArray{
 * 							&media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs{
 * 								RsaTokenKeyExponent: pulumi.String("AQAB"),
 * 								RsaTokenKeyModulus:  pulumi.String("AQAD"),
 * 							},
 * 							&media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs{
 * 								SymmetricTokenKey: pulumi.String("BBAAAAAAAAAAAAAAAAAAAA=="),
 * 							},
 * 						},
 * 					},
 * 				},
 * 				&media.ContentKeyPolicyPolicyOptionArgs{
 * 					Name:                          pulumi.String("widevine"),
 * 					WidevineConfigurationTemplate: pulumi.String(json0),
 * 					OpenRestrictionEnabled:        pulumi.Bool(true),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.media.ServiceAccount;
 * import com.pulumi.azure.media.ServiceAccountArgs;
 * import com.pulumi.azure.media.inputs.ServiceAccountStorageAccountArgs;
 * import com.pulumi.azure.media.ContentKeyPolicy;
 * import com.pulumi.azure.media.ContentKeyPolicyArgs;
 * import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionArgs;
 * import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs;
 * import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("media-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("examplestoracc")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("GRS")
 *             .build());
 *         var exampleServiceAccount = new ServiceAccount("exampleServiceAccount", ServiceAccountArgs.builder()
 *             .name("examplemediaacc")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .storageAccounts(ServiceAccountStorageAccountArgs.builder()
 *                 .id(exampleAccount.id())
 *                 .isPrimary(true)
 *                 .build())
 *             .build());
 *         var exampleContentKeyPolicy = new ContentKeyPolicy("exampleContentKeyPolicy", ContentKeyPolicyArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .mediaServicesAccountName(exampleServiceAccount.name())
 *             .policyOptions(
 *                 ContentKeyPolicyPolicyOptionArgs.builder()
 *                     .name("fairPlay")
 *                     .fairplayConfiguration(ContentKeyPolicyPolicyOptionFairplayConfigurationArgs.builder()
 *                         .ask("bb566284cc124a21c435a92cd3c108c4")
 *                         .pfx("MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ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2dJQqm1n72A6nUHPkHEusN7iH/+mv5d3iaKxn7/ShxLKHfjMd+r/gv27ylshVHiN4mVStAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=")
 *                         .pfxPassword("password")
 *                         .rentalDurationSeconds(2249)
 *                         .rentalAndLeaseKeyType("PersistentUnlimited")
 *                         .build())
 *                     .openRestrictionEnabled(true)
 *                     .build(),
 *                 ContentKeyPolicyPolicyOptionArgs.builder()
 *                     .name("playReady")
 *                     .playreadyConfigurationLicenses(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs.builder()
 *                         .allowTestDevices(true)
 *                         .beginDate("2017-10-16T18:22:53Z")
 *                         .securityLevel("SL150")
 *                         .playRight(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs.builder()
 *                             .scmsRestriction(2)
 *                             .digitalVideoOnlyContentRestriction(false)
 *                             .imageConstraintForAnalogComponentVideoRestriction(false)
 *                             .imageConstraintForAnalogComputerMonitorRestriction(false)
 *                             .allowPassingVideoContentToUnknownOutput("NotAllowed")
 *                             .uncompressedDigitalVideoOpl(100)
 *                             .uncompressedDigitalAudioOpl(100)
 *                             .analogVideoOpl(150)
 *                             .compressedDigitalAudioOpl(250)
 *                             .compressedDigitalVideoOpl(400)
 *                             .explicitAnalogTelevisionOutputRestriction(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs.builder()
 *                                 .bestEffortEnforced(true)
 *                                 .controlBits(3)
 *                                 .build())
 *                             .build())
 *                         .licenseType("Persistent")
 *                         .contentType("UltraVioletDownload")
 *                         .contentKeyLocationFromHeaderEnabled(true)
 *                         .build())
 *                     .openRestrictionEnabled(true)
 *                     .build(),
 *                 ContentKeyPolicyPolicyOptionArgs.builder()
 *                     .name("clearKey")
 *                     .clearKeyConfigurationEnabled(true)
 *                     .tokenRestriction(ContentKeyPolicyPolicyOptionTokenRestrictionArgs.builder()
 *                         .issuer("urn:issuer")
 *                         .audience("urn:audience")
 *                         .tokenType("Swt")
 *                         .primarySymmetricTokenKey("AAAAAAAAAAAAAAAAAAAAAA==")
 *                         .alternateKeys(
 *                             ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs.builder()
 *                                 .rsaTokenKeyExponent("AQAB")
 *                                 .rsaTokenKeyModulus("AQAD")
 *                                 .build(),
 *                             ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs.builder()
 *                                 .symmetricTokenKey("BBAAAAAAAAAAAAAAAAAAAA==")
 *                                 .build())
 *                         .build())
 *                     .build(),
 *                 ContentKeyPolicyPolicyOptionArgs.builder()
 *                     .name("widevine")
 *                     .widevineConfigurationTemplate(serializeJson(
 *                         jsonObject(
 *                             jsonProperty("allowed_track_types", "SD_HD"),
 *                             jsonProperty("content_key_specs", jsonArray(jsonObject(
 *                                 jsonProperty("track_type", "SD"),
 *                                 jsonProperty("security_level", 1),
 *                                 jsonProperty("required_output_protection", jsonObject(
 *                                     jsonProperty("hdcp", "HDCP_V2")
 *                                 ))
 *                             ))),
 *                             jsonProperty("policy_overrides", jsonObject(
 *                                 jsonProperty("can_play", true),
 *                                 jsonProperty("can_persist", true),
 *                                 jsonProperty("can_renew", false)
 *                             ))
 *                         )))
 *                     .openRestrictionEnabled(true)
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: media-resources
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: examplestoracc
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: GRS
 *   exampleServiceAccount:
 *     type: azure:media:ServiceAccount
 *     name: example
 *     properties:
 *       name: examplemediaacc
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       storageAccounts:
 *         - id: ${exampleAccount.id}
 *           isPrimary: true
 *   exampleContentKeyPolicy:
 *     type: azure:media:ContentKeyPolicy
 *     name: example
 *     properties:
 *       name: example
 *       resourceGroupName: ${example.name}
 *       mediaServicesAccountName: ${exampleServiceAccount.name}
 *       policyOptions:
 *         - name: fairPlay
 *           fairplayConfiguration:
 *             ask: bb566284cc124a21c435a92cd3c108c4
 *             pfx: MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52Esad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hvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQISS7mG/riQJkCAgfQgIICiPSGg5axP4JM+GmiVEqOHTVAPw2AM8OPnn1q0mIw54oC2WOJw3FFThYHmxTQzQ1feVmnkVCv++eFp+BYTcWTa+ehl/3/Nvr5uLTzDxmCShacKwoWXOKtSLh6mmgydvMqSf6xv1bPsloodtrRxhprI2lBNBW2uw8az9eLdvURYmhjGPf9klEy/6OCA5jDT5XZMunwiQT5mYNMF7wAQ5PCz2dJQqm1n72A6nUHPkHEusN7iH/+mv5d3iaKxn7/ShxLKHfjMd+r/gv27ylshVHiN4mVStAg+MiLrVvr5VH46p6oosImvS3ZO4D5wTmh/6wtus803qN4QB/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=
 *             pfxPassword: password
 *             rentalDurationSeconds: 2249
 *             rentalAndLeaseKeyType: PersistentUnlimited
 *           openRestrictionEnabled: true
 *         - name: playReady
 *           playreadyConfigurationLicenses:
 *             - allowTestDevices: true
 *               beginDate: 2017-10-16T18:22:53Z
 *               securityLevel: SL150
 *               playRight:
 *                 scmsRestriction: 2
 *                 digitalVideoOnlyContentRestriction: false
 *                 imageConstraintForAnalogComponentVideoRestriction: false
 *                 imageConstraintForAnalogComputerMonitorRestriction: false
 *                 allowPassingVideoContentToUnknownOutput: NotAllowed
 *                 uncompressedDigitalVideoOpl: 100
 *                 uncompressedDigitalAudioOpl: 100
 *                 analogVideoOpl: 150
 *                 compressedDigitalAudioOpl: 250
 *                 compressedDigitalVideoOpl: 400
 *                 explicitAnalogTelevisionOutputRestriction:
 *                   bestEffortEnforced: true
 *                   controlBits: 3
 *               licenseType: Persistent
 *               contentType: UltraVioletDownload
 *               contentKeyLocationFromHeaderEnabled: true
 *           openRestrictionEnabled: true
 *         - name: clearKey
 *           clearKeyConfigurationEnabled: true
 *           tokenRestriction:
 *             issuer: urn:issuer
 *             audience: urn:audience
 *             tokenType: Swt
 *             primarySymmetricTokenKey: AAAAAAAAAAAAAAAAAAAAAA==
 *             alternateKeys:
 *               - rsaTokenKeyExponent: AQAB
 *                 rsaTokenKeyModulus: AQAD
 *               - symmetricTokenKey: BBAAAAAAAAAAAAAAAAAAAA==
 *         - name: widevine
 *           widevineConfigurationTemplate:
 *             fn::toJSON:
 *               allowed_track_types: SD_HD
 *               content_key_specs:
 *                 - track_type: SD
 *                   security_level: 1
 *                   required_output_protection:
 *                     hdcp: HDCP_V2
 *               policy_overrides:
 *                 can_play: true
 *                 can_persist: true
 *                 can_renew: false
 *           openRestrictionEnabled: true
 * ```
 * 
 * ## Import
 * Content Key Policy can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:media/contentKeyPolicy:ContentKeyPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/contentKeyPolicies/policy1
 * ```
 */
public class ContentKeyPolicy internal constructor(
    override val javaResource: com.pulumi.azure.media.ContentKeyPolicy,
) : KotlinCustomResource(javaResource, ContentKeyPolicyMapper) {
    /**
     * A description for the Policy.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Media Services account name. Changing this forces a new Content Key Policy to be created.
     */
    public val mediaServicesAccountName: Output
        get() = javaResource.mediaServicesAccountName().applyValue({ args0 -> args0 })

    /**
     * The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * One or more `policy_option` blocks as defined below.
     */
    public val policyOptions: Output>
        get() = javaResource.policyOptions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            })
        })

    /**
     * The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
}

public object ContentKeyPolicyMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.media.ContentKeyPolicy::class == javaResource::class

    override fun map(javaResource: Resource): ContentKeyPolicy = ContentKeyPolicy(
        javaResource as
            com.pulumi.azure.media.ContentKeyPolicy,
    )
}

/**
 * @see [ContentKeyPolicy].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ContentKeyPolicy].
 */
public suspend fun contentKeyPolicy(
    name: String,
    block: suspend ContentKeyPolicyResourceBuilder.() -> Unit,
): ContentKeyPolicy {
    val builder = ContentKeyPolicyResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ContentKeyPolicy].
 * @param name The _unique_ name of the resulting resource.
 */
public fun contentKeyPolicy(name: String): ContentKeyPolicy {
    val builder = ContentKeyPolicyResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy