1. Packages
  2. Azure Classic
  3. API Docs
  4. media
  5. ContentKeyPolicy

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.media.ContentKeyPolicy

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Content Key Policy.

    Example Usage

    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/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4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++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: 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,
            },
        ],
    });
    
    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=[azure.media.ServiceAccountStorageAccountArgs(
            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=[
            azure.media.ContentKeyPolicyPolicyOptionArgs(
                name="fairPlay",
                fairplay_configuration=azure.media.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs(
                    ask="bb566284cc124a21c435a92cd3c108c4",
                    pfx="MIIG7gIBAzCCBqoGCSqGSIb3DQEHAaCCBpsEggaXMIIGkzCCA7wGCSqGSIb3DQEHAaCCA60EggOpMIIDpTCCA6EGCyqGSIb3DQEMCgECoIICtjCCArIwHAYKKoZIhvcNAQwBAzAOBAiV65vFfxLDVgICB9AEggKQx2dxWefICYodVhRLSQVMJRYy5QkM1VySPAXGP744JHrb+s0Y8i/6a+a5itZGlXw3kvxyflHtSsuuBCaYJ1WOCp9jspixJEliFHXTcel96AgZlT5tB7vC6pdZnz8rb+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU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SjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/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,
            ),
            azure.media.ContentKeyPolicyPolicyOptionArgs(
                name="playReady",
                playready_configuration_licenses=[azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs(
                    allow_test_devices=True,
                    begin_date="2017-10-16T18:22:53Z",
                    security_level="SL150",
                    play_right=azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs(
                        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=azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs(
                            best_effort_enforced=True,
                            control_bits=3,
                        ),
                    ),
                    license_type="Persistent",
                    content_type="UltraVioletDownload",
                    content_key_location_from_header_enabled=True,
                )],
                open_restriction_enabled=True,
            ),
            azure.media.ContentKeyPolicyPolicyOptionArgs(
                name="clearKey",
                clear_key_configuration_enabled=True,
                token_restriction=azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionArgs(
                    issuer="urn:issuer",
                    audience="urn:audience",
                    token_type="Swt",
                    primary_symmetric_token_key="AAAAAAAAAAAAAAAAAAAAAA==",
                    alternate_keys=[
                        azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs(
                            rsa_token_key_exponent="AQAB",
                            rsa_token_key_modulus="AQAD",
                        ),
                        azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs(
                            symmetric_token_key="BBAAAAAAAAAAAAAAAAAAAA==",
                        ),
                    ],
                ),
            ),
            azure.media.ContentKeyPolicyPolicyOptionArgs(
                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,
            ),
        ])
    
    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+a5itZGlXw3kvxyflHtSsuu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("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
    	})
    }
    
    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/ZQRIutGL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IKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+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<string, object?>
                    {
                        ["allowed_track_types"] = "SD_HD",
                        ["content_key_specs"] = new[]
                        {
                            new Dictionary<string, object?>
                            {
                                ["track_type"] = "SD",
                                ["security_level"] = 1,
                                ["required_output_protection"] = new Dictionary<string, object?>
                                {
                                    ["hdcp"] = "HDCP_V2",
                                },
                            },
                        },
                        ["policy_overrides"] = new Dictionary<string, object?>
                        {
                            ["can_play"] = true,
                            ["can_persist"] = true,
                            ["can_renew"] = false,
                        },
                    }),
                    OpenRestrictionEnabled = true,
                },
            },
        });
    
    });
    
    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+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4+0trUMi/ODtOxAc+lMQk2FNDcNeKIX5wHwFRS+sFBu5Um4Jfj6Ua4w1izmu2Ki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T/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());
    
        }
    }
    
    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+lyxFs99x2CW52EsadoDlRsYrmkmKdnB0cx2JHJbLeXuKV/fjuRJSqCFcDa6Nre8AlBX0zKGIYGLJ1Cfpora4kNTXxu0AwEowzGmoCxqrpKbO1QDi1hZ1qHrtZ1ienAKfiTXaGH4AMQzyut0AaymxalrRbXibJYuefLRvXqx0oLZKVLAX8fR1gnac6Mrr7GkdHaKCsk4eOi98acR7bjiyRRVYYS4B6Y0tCeRJNe6zeYVmLdtatuOlOEVDT6AKrJJMFMyITVS+2D771ge6m37FbJ36K3/eT/HRq1YDsxfD/BY+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm9TTcg8qZpjyePn3B9TvFVSXMJHn/rzu6OJAgFgVFAe1tPGLh1XBxAvwpB8EqcycIIUUFUBy4HgYCicjI2jp6s8Kk293Uc/TA2623LrWgP/Xm5hVB7lP1k6W9LDivOlAA96D0Cbk08Yv6arkCYj7ONFO8VZbO0zKAAOLHMw/ZQRIutGLrDlqgTDeRXRuReX7TNjDBxp2rzJBY0uU5g9BMFxQrbQwEx9HsnO4dVFG4KLbHmYWhlwS2V2uZtY6D6elOXY3SX50RwhC4+0trUMi/ODtOxAc+lMQk2FNDcNeKIX5wHwFRS+sFBu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kCaTM9mnJAAqWgggUWkrOKT/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
    

    Create ContentKeyPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ContentKeyPolicy(name: string, args: ContentKeyPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ContentKeyPolicy(resource_name: str,
                         args: ContentKeyPolicyArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContentKeyPolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         media_services_account_name: Optional[str] = None,
                         policy_options: Optional[Sequence[ContentKeyPolicyPolicyOptionArgs]] = None,
                         resource_group_name: Optional[str] = None,
                         description: Optional[str] = None,
                         name: Optional[str] = None)
    func NewContentKeyPolicy(ctx *Context, name string, args ContentKeyPolicyArgs, opts ...ResourceOption) (*ContentKeyPolicy, error)
    public ContentKeyPolicy(string name, ContentKeyPolicyArgs args, CustomResourceOptions? opts = null)
    public ContentKeyPolicy(String name, ContentKeyPolicyArgs args)
    public ContentKeyPolicy(String name, ContentKeyPolicyArgs args, CustomResourceOptions options)
    
    type: azure:media:ContentKeyPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ContentKeyPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ContentKeyPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ContentKeyPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContentKeyPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContentKeyPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var contentKeyPolicyResource = new Azure.Media.ContentKeyPolicy("contentKeyPolicyResource", new()
    {
        MediaServicesAccountName = "string",
        PolicyOptions = new[]
        {
            new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionArgs
            {
                Name = "string",
                ClearKeyConfigurationEnabled = false,
                FairplayConfiguration = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs
                {
                    Ask = "string",
                    OfflineRentalConfiguration = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs
                    {
                        PlaybackDurationSeconds = 0,
                        StorageDurationSeconds = 0,
                    },
                    Pfx = "string",
                    PfxPassword = "string",
                    RentalAndLeaseKeyType = "string",
                    RentalDurationSeconds = 0,
                },
                OpenRestrictionEnabled = false,
                PlayreadyConfigurationLicenses = new[]
                {
                    new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs
                    {
                        AllowTestDevices = false,
                        BeginDate = "string",
                        ContentKeyLocationFromHeaderEnabled = false,
                        ContentKeyLocationFromKeyId = "string",
                        ContentType = "string",
                        ExpirationDate = "string",
                        GracePeriod = "string",
                        LicenseType = "string",
                        PlayRight = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs
                        {
                            AgcAndColorStripeRestriction = 0,
                            AllowPassingVideoContentToUnknownOutput = "string",
                            AnalogVideoOpl = 0,
                            CompressedDigitalAudioOpl = 0,
                            CompressedDigitalVideoOpl = 0,
                            DigitalVideoOnlyContentRestriction = false,
                            ExplicitAnalogTelevisionOutputRestriction = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs
                            {
                                ControlBits = 0,
                                BestEffortEnforced = false,
                            },
                            FirstPlayExpiration = "string",
                            ImageConstraintForAnalogComponentVideoRestriction = false,
                            ImageConstraintForAnalogComputerMonitorRestriction = false,
                            ScmsRestriction = 0,
                            UncompressedDigitalAudioOpl = 0,
                            UncompressedDigitalVideoOpl = 0,
                        },
                        RelativeBeginDate = "string",
                        RelativeExpirationDate = "string",
                        SecurityLevel = "string",
                    },
                },
                PlayreadyResponseCustomData = "string",
                TokenRestriction = new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionArgs
                {
                    AlternateKeys = new[]
                    {
                        new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs
                        {
                            RsaTokenKeyExponent = "string",
                            RsaTokenKeyModulus = "string",
                            SymmetricTokenKey = "string",
                            X509TokenKeyRaw = "string",
                        },
                    },
                    Audience = "string",
                    Issuer = "string",
                    OpenIdConnectDiscoveryDocument = "string",
                    PrimaryRsaTokenKeyExponent = "string",
                    PrimaryRsaTokenKeyModulus = "string",
                    PrimarySymmetricTokenKey = "string",
                    PrimaryX509TokenKeyRaw = "string",
                    RequiredClaims = new[]
                    {
                        new Azure.Media.Inputs.ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs
                        {
                            Type = "string",
                            Value = "string",
                        },
                    },
                    TokenType = "string",
                },
                WidevineConfigurationTemplate = "string",
            },
        },
        ResourceGroupName = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := media.NewContentKeyPolicy(ctx, "contentKeyPolicyResource", &media.ContentKeyPolicyArgs{
    	MediaServicesAccountName: pulumi.String("string"),
    	PolicyOptions: media.ContentKeyPolicyPolicyOptionArray{
    		&media.ContentKeyPolicyPolicyOptionArgs{
    			Name:                         pulumi.String("string"),
    			ClearKeyConfigurationEnabled: pulumi.Bool(false),
    			FairplayConfiguration: &media.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs{
    				Ask: pulumi.String("string"),
    				OfflineRentalConfiguration: &media.ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs{
    					PlaybackDurationSeconds: pulumi.Int(0),
    					StorageDurationSeconds:  pulumi.Int(0),
    				},
    				Pfx:                   pulumi.String("string"),
    				PfxPassword:           pulumi.String("string"),
    				RentalAndLeaseKeyType: pulumi.String("string"),
    				RentalDurationSeconds: pulumi.Int(0),
    			},
    			OpenRestrictionEnabled: pulumi.Bool(false),
    			PlayreadyConfigurationLicenses: media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArray{
    				&media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs{
    					AllowTestDevices:                    pulumi.Bool(false),
    					BeginDate:                           pulumi.String("string"),
    					ContentKeyLocationFromHeaderEnabled: pulumi.Bool(false),
    					ContentKeyLocationFromKeyId:         pulumi.String("string"),
    					ContentType:                         pulumi.String("string"),
    					ExpirationDate:                      pulumi.String("string"),
    					GracePeriod:                         pulumi.String("string"),
    					LicenseType:                         pulumi.String("string"),
    					PlayRight: &media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs{
    						AgcAndColorStripeRestriction:            pulumi.Int(0),
    						AllowPassingVideoContentToUnknownOutput: pulumi.String("string"),
    						AnalogVideoOpl:                          pulumi.Int(0),
    						CompressedDigitalAudioOpl:               pulumi.Int(0),
    						CompressedDigitalVideoOpl:               pulumi.Int(0),
    						DigitalVideoOnlyContentRestriction:      pulumi.Bool(false),
    						ExplicitAnalogTelevisionOutputRestriction: &media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs{
    							ControlBits:        pulumi.Int(0),
    							BestEffortEnforced: pulumi.Bool(false),
    						},
    						FirstPlayExpiration: pulumi.String("string"),
    						ImageConstraintForAnalogComponentVideoRestriction:  pulumi.Bool(false),
    						ImageConstraintForAnalogComputerMonitorRestriction: pulumi.Bool(false),
    						ScmsRestriction:             pulumi.Int(0),
    						UncompressedDigitalAudioOpl: pulumi.Int(0),
    						UncompressedDigitalVideoOpl: pulumi.Int(0),
    					},
    					RelativeBeginDate:      pulumi.String("string"),
    					RelativeExpirationDate: pulumi.String("string"),
    					SecurityLevel:          pulumi.String("string"),
    				},
    			},
    			PlayreadyResponseCustomData: pulumi.String("string"),
    			TokenRestriction: &media.ContentKeyPolicyPolicyOptionTokenRestrictionArgs{
    				AlternateKeys: media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArray{
    					&media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs{
    						RsaTokenKeyExponent: pulumi.String("string"),
    						RsaTokenKeyModulus:  pulumi.String("string"),
    						SymmetricTokenKey:   pulumi.String("string"),
    						X509TokenKeyRaw:     pulumi.String("string"),
    					},
    				},
    				Audience:                       pulumi.String("string"),
    				Issuer:                         pulumi.String("string"),
    				OpenIdConnectDiscoveryDocument: pulumi.String("string"),
    				PrimaryRsaTokenKeyExponent:     pulumi.String("string"),
    				PrimaryRsaTokenKeyModulus:      pulumi.String("string"),
    				PrimarySymmetricTokenKey:       pulumi.String("string"),
    				PrimaryX509TokenKeyRaw:         pulumi.String("string"),
    				RequiredClaims: media.ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArray{
    					&media.ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs{
    						Type:  pulumi.String("string"),
    						Value: pulumi.String("string"),
    					},
    				},
    				TokenType: pulumi.String("string"),
    			},
    			WidevineConfigurationTemplate: pulumi.String("string"),
    		},
    	},
    	ResourceGroupName: pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var contentKeyPolicyResource = new ContentKeyPolicy("contentKeyPolicyResource", ContentKeyPolicyArgs.builder()
        .mediaServicesAccountName("string")
        .policyOptions(ContentKeyPolicyPolicyOptionArgs.builder()
            .name("string")
            .clearKeyConfigurationEnabled(false)
            .fairplayConfiguration(ContentKeyPolicyPolicyOptionFairplayConfigurationArgs.builder()
                .ask("string")
                .offlineRentalConfiguration(ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs.builder()
                    .playbackDurationSeconds(0)
                    .storageDurationSeconds(0)
                    .build())
                .pfx("string")
                .pfxPassword("string")
                .rentalAndLeaseKeyType("string")
                .rentalDurationSeconds(0)
                .build())
            .openRestrictionEnabled(false)
            .playreadyConfigurationLicenses(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs.builder()
                .allowTestDevices(false)
                .beginDate("string")
                .contentKeyLocationFromHeaderEnabled(false)
                .contentKeyLocationFromKeyId("string")
                .contentType("string")
                .expirationDate("string")
                .gracePeriod("string")
                .licenseType("string")
                .playRight(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs.builder()
                    .agcAndColorStripeRestriction(0)
                    .allowPassingVideoContentToUnknownOutput("string")
                    .analogVideoOpl(0)
                    .compressedDigitalAudioOpl(0)
                    .compressedDigitalVideoOpl(0)
                    .digitalVideoOnlyContentRestriction(false)
                    .explicitAnalogTelevisionOutputRestriction(ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs.builder()
                        .controlBits(0)
                        .bestEffortEnforced(false)
                        .build())
                    .firstPlayExpiration("string")
                    .imageConstraintForAnalogComponentVideoRestriction(false)
                    .imageConstraintForAnalogComputerMonitorRestriction(false)
                    .scmsRestriction(0)
                    .uncompressedDigitalAudioOpl(0)
                    .uncompressedDigitalVideoOpl(0)
                    .build())
                .relativeBeginDate("string")
                .relativeExpirationDate("string")
                .securityLevel("string")
                .build())
            .playreadyResponseCustomData("string")
            .tokenRestriction(ContentKeyPolicyPolicyOptionTokenRestrictionArgs.builder()
                .alternateKeys(ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs.builder()
                    .rsaTokenKeyExponent("string")
                    .rsaTokenKeyModulus("string")
                    .symmetricTokenKey("string")
                    .x509TokenKeyRaw("string")
                    .build())
                .audience("string")
                .issuer("string")
                .openIdConnectDiscoveryDocument("string")
                .primaryRsaTokenKeyExponent("string")
                .primaryRsaTokenKeyModulus("string")
                .primarySymmetricTokenKey("string")
                .primaryX509TokenKeyRaw("string")
                .requiredClaims(ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs.builder()
                    .type("string")
                    .value("string")
                    .build())
                .tokenType("string")
                .build())
            .widevineConfigurationTemplate("string")
            .build())
        .resourceGroupName("string")
        .description("string")
        .name("string")
        .build());
    
    content_key_policy_resource = azure.media.ContentKeyPolicy("contentKeyPolicyResource",
        media_services_account_name="string",
        policy_options=[azure.media.ContentKeyPolicyPolicyOptionArgs(
            name="string",
            clear_key_configuration_enabled=False,
            fairplay_configuration=azure.media.ContentKeyPolicyPolicyOptionFairplayConfigurationArgs(
                ask="string",
                offline_rental_configuration=azure.media.ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs(
                    playback_duration_seconds=0,
                    storage_duration_seconds=0,
                ),
                pfx="string",
                pfx_password="string",
                rental_and_lease_key_type="string",
                rental_duration_seconds=0,
            ),
            open_restriction_enabled=False,
            playready_configuration_licenses=[azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs(
                allow_test_devices=False,
                begin_date="string",
                content_key_location_from_header_enabled=False,
                content_key_location_from_key_id="string",
                content_type="string",
                expiration_date="string",
                grace_period="string",
                license_type="string",
                play_right=azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs(
                    agc_and_color_stripe_restriction=0,
                    allow_passing_video_content_to_unknown_output="string",
                    analog_video_opl=0,
                    compressed_digital_audio_opl=0,
                    compressed_digital_video_opl=0,
                    digital_video_only_content_restriction=False,
                    explicit_analog_television_output_restriction=azure.media.ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs(
                        control_bits=0,
                        best_effort_enforced=False,
                    ),
                    first_play_expiration="string",
                    image_constraint_for_analog_component_video_restriction=False,
                    image_constraint_for_analog_computer_monitor_restriction=False,
                    scms_restriction=0,
                    uncompressed_digital_audio_opl=0,
                    uncompressed_digital_video_opl=0,
                ),
                relative_begin_date="string",
                relative_expiration_date="string",
                security_level="string",
            )],
            playready_response_custom_data="string",
            token_restriction=azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionArgs(
                alternate_keys=[azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs(
                    rsa_token_key_exponent="string",
                    rsa_token_key_modulus="string",
                    symmetric_token_key="string",
                    x509_token_key_raw="string",
                )],
                audience="string",
                issuer="string",
                open_id_connect_discovery_document="string",
                primary_rsa_token_key_exponent="string",
                primary_rsa_token_key_modulus="string",
                primary_symmetric_token_key="string",
                primary_x509_token_key_raw="string",
                required_claims=[azure.media.ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs(
                    type="string",
                    value="string",
                )],
                token_type="string",
            ),
            widevine_configuration_template="string",
        )],
        resource_group_name="string",
        description="string",
        name="string")
    
    const contentKeyPolicyResource = new azure.media.ContentKeyPolicy("contentKeyPolicyResource", {
        mediaServicesAccountName: "string",
        policyOptions: [{
            name: "string",
            clearKeyConfigurationEnabled: false,
            fairplayConfiguration: {
                ask: "string",
                offlineRentalConfiguration: {
                    playbackDurationSeconds: 0,
                    storageDurationSeconds: 0,
                },
                pfx: "string",
                pfxPassword: "string",
                rentalAndLeaseKeyType: "string",
                rentalDurationSeconds: 0,
            },
            openRestrictionEnabled: false,
            playreadyConfigurationLicenses: [{
                allowTestDevices: false,
                beginDate: "string",
                contentKeyLocationFromHeaderEnabled: false,
                contentKeyLocationFromKeyId: "string",
                contentType: "string",
                expirationDate: "string",
                gracePeriod: "string",
                licenseType: "string",
                playRight: {
                    agcAndColorStripeRestriction: 0,
                    allowPassingVideoContentToUnknownOutput: "string",
                    analogVideoOpl: 0,
                    compressedDigitalAudioOpl: 0,
                    compressedDigitalVideoOpl: 0,
                    digitalVideoOnlyContentRestriction: false,
                    explicitAnalogTelevisionOutputRestriction: {
                        controlBits: 0,
                        bestEffortEnforced: false,
                    },
                    firstPlayExpiration: "string",
                    imageConstraintForAnalogComponentVideoRestriction: false,
                    imageConstraintForAnalogComputerMonitorRestriction: false,
                    scmsRestriction: 0,
                    uncompressedDigitalAudioOpl: 0,
                    uncompressedDigitalVideoOpl: 0,
                },
                relativeBeginDate: "string",
                relativeExpirationDate: "string",
                securityLevel: "string",
            }],
            playreadyResponseCustomData: "string",
            tokenRestriction: {
                alternateKeys: [{
                    rsaTokenKeyExponent: "string",
                    rsaTokenKeyModulus: "string",
                    symmetricTokenKey: "string",
                    x509TokenKeyRaw: "string",
                }],
                audience: "string",
                issuer: "string",
                openIdConnectDiscoveryDocument: "string",
                primaryRsaTokenKeyExponent: "string",
                primaryRsaTokenKeyModulus: "string",
                primarySymmetricTokenKey: "string",
                primaryX509TokenKeyRaw: "string",
                requiredClaims: [{
                    type: "string",
                    value: "string",
                }],
                tokenType: "string",
            },
            widevineConfigurationTemplate: "string",
        }],
        resourceGroupName: "string",
        description: "string",
        name: "string",
    });
    
    type: azure:media:ContentKeyPolicy
    properties:
        description: string
        mediaServicesAccountName: string
        name: string
        policyOptions:
            - clearKeyConfigurationEnabled: false
              fairplayConfiguration:
                ask: string
                offlineRentalConfiguration:
                    playbackDurationSeconds: 0
                    storageDurationSeconds: 0
                pfx: string
                pfxPassword: string
                rentalAndLeaseKeyType: string
                rentalDurationSeconds: 0
              name: string
              openRestrictionEnabled: false
              playreadyConfigurationLicenses:
                - allowTestDevices: false
                  beginDate: string
                  contentKeyLocationFromHeaderEnabled: false
                  contentKeyLocationFromKeyId: string
                  contentType: string
                  expirationDate: string
                  gracePeriod: string
                  licenseType: string
                  playRight:
                    agcAndColorStripeRestriction: 0
                    allowPassingVideoContentToUnknownOutput: string
                    analogVideoOpl: 0
                    compressedDigitalAudioOpl: 0
                    compressedDigitalVideoOpl: 0
                    digitalVideoOnlyContentRestriction: false
                    explicitAnalogTelevisionOutputRestriction:
                        bestEffortEnforced: false
                        controlBits: 0
                    firstPlayExpiration: string
                    imageConstraintForAnalogComponentVideoRestriction: false
                    imageConstraintForAnalogComputerMonitorRestriction: false
                    scmsRestriction: 0
                    uncompressedDigitalAudioOpl: 0
                    uncompressedDigitalVideoOpl: 0
                  relativeBeginDate: string
                  relativeExpirationDate: string
                  securityLevel: string
              playreadyResponseCustomData: string
              tokenRestriction:
                alternateKeys:
                    - rsaTokenKeyExponent: string
                      rsaTokenKeyModulus: string
                      symmetricTokenKey: string
                      x509TokenKeyRaw: string
                audience: string
                issuer: string
                openIdConnectDiscoveryDocument: string
                primaryRsaTokenKeyExponent: string
                primaryRsaTokenKeyModulus: string
                primarySymmetricTokenKey: string
                primaryX509TokenKeyRaw: string
                requiredClaims:
                    - type: string
                      value: string
                tokenType: string
              widevineConfigurationTemplate: string
        resourceGroupName: string
    

    ContentKeyPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ContentKeyPolicy resource accepts the following input properties:

    MediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    PolicyOptions List<ContentKeyPolicyPolicyOption>
    One or more policy_option blocks as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    Description string
    A description for the Policy.
    Name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    MediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    PolicyOptions []ContentKeyPolicyPolicyOptionArgs
    One or more policy_option blocks as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    Description string
    A description for the Policy.
    Name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    mediaServicesAccountName String
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    policyOptions List<ContentKeyPolicyPolicyOption>
    One or more policy_option blocks as defined below.
    resourceGroupName String
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description String
    A description for the Policy.
    name String
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    mediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    policyOptions ContentKeyPolicyPolicyOption[]
    One or more policy_option blocks as defined below.
    resourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description string
    A description for the Policy.
    name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    media_services_account_name str
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    policy_options Sequence[ContentKeyPolicyPolicyOptionArgs]
    One or more policy_option blocks as defined below.
    resource_group_name str
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description str
    A description for the Policy.
    name str
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    mediaServicesAccountName String
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    policyOptions List<Property Map>
    One or more policy_option blocks as defined below.
    resourceGroupName String
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description String
    A description for the Policy.
    name String
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ContentKeyPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ContentKeyPolicy Resource

    Get an existing ContentKeyPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ContentKeyPolicyState, opts?: CustomResourceOptions): ContentKeyPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            media_services_account_name: Optional[str] = None,
            name: Optional[str] = None,
            policy_options: Optional[Sequence[ContentKeyPolicyPolicyOptionArgs]] = None,
            resource_group_name: Optional[str] = None) -> ContentKeyPolicy
    func GetContentKeyPolicy(ctx *Context, name string, id IDInput, state *ContentKeyPolicyState, opts ...ResourceOption) (*ContentKeyPolicy, error)
    public static ContentKeyPolicy Get(string name, Input<string> id, ContentKeyPolicyState? state, CustomResourceOptions? opts = null)
    public static ContentKeyPolicy get(String name, Output<String> id, ContentKeyPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    A description for the Policy.
    MediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    Name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    PolicyOptions List<ContentKeyPolicyPolicyOption>
    One or more policy_option blocks as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    Description string
    A description for the Policy.
    MediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    Name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    PolicyOptions []ContentKeyPolicyPolicyOptionArgs
    One or more policy_option blocks as defined below.
    ResourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description String
    A description for the Policy.
    mediaServicesAccountName String
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    name String
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    policyOptions List<ContentKeyPolicyPolicyOption>
    One or more policy_option blocks as defined below.
    resourceGroupName String
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description string
    A description for the Policy.
    mediaServicesAccountName string
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    name string
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    policyOptions ContentKeyPolicyPolicyOption[]
    One or more policy_option blocks as defined below.
    resourceGroupName string
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description str
    A description for the Policy.
    media_services_account_name str
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    name str
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    policy_options Sequence[ContentKeyPolicyPolicyOptionArgs]
    One or more policy_option blocks as defined below.
    resource_group_name str
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.
    description String
    A description for the Policy.
    mediaServicesAccountName String
    The Media Services account name. Changing this forces a new Content Key Policy to be created.
    name String
    The name which should be used for this Content Key Policy. Changing this forces a new Content Key Policy to be created.
    policyOptions List<Property Map>
    One or more policy_option blocks as defined below.
    resourceGroupName String
    The name of the Resource Group where the Content Key Policy should exist. Changing this forces a new Content Key Policy to be created.

    Supporting Types

    ContentKeyPolicyPolicyOption, ContentKeyPolicyPolicyOptionArgs

    Name string
    The name which should be used for this Policy Option.
    ClearKeyConfigurationEnabled bool
    Enable a configuration for non-DRM keys.
    FairplayConfiguration ContentKeyPolicyPolicyOptionFairplayConfiguration
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    OpenRestrictionEnabled bool
    Enable an open restriction. License or key will be delivered on every request.
    PlayreadyConfigurationLicenses List<ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense>
    One or more playready_configuration_license blocks as defined above.
    PlayreadyResponseCustomData string
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    TokenRestriction ContentKeyPolicyPolicyOptionTokenRestriction
    A token_restriction block as defined below.
    WidevineConfigurationTemplate string

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    Name string
    The name which should be used for this Policy Option.
    ClearKeyConfigurationEnabled bool
    Enable a configuration for non-DRM keys.
    FairplayConfiguration ContentKeyPolicyPolicyOptionFairplayConfiguration
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    OpenRestrictionEnabled bool
    Enable an open restriction. License or key will be delivered on every request.
    PlayreadyConfigurationLicenses []ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense
    One or more playready_configuration_license blocks as defined above.
    PlayreadyResponseCustomData string
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    TokenRestriction ContentKeyPolicyPolicyOptionTokenRestriction
    A token_restriction block as defined below.
    WidevineConfigurationTemplate string

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    name String
    The name which should be used for this Policy Option.
    clearKeyConfigurationEnabled Boolean
    Enable a configuration for non-DRM keys.
    fairplayConfiguration ContentKeyPolicyPolicyOptionFairplayConfiguration
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    openRestrictionEnabled Boolean
    Enable an open restriction. License or key will be delivered on every request.
    playreadyConfigurationLicenses List<ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense>
    One or more playready_configuration_license blocks as defined above.
    playreadyResponseCustomData String
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    tokenRestriction ContentKeyPolicyPolicyOptionTokenRestriction
    A token_restriction block as defined below.
    widevineConfigurationTemplate String

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    name string
    The name which should be used for this Policy Option.
    clearKeyConfigurationEnabled boolean
    Enable a configuration for non-DRM keys.
    fairplayConfiguration ContentKeyPolicyPolicyOptionFairplayConfiguration
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    openRestrictionEnabled boolean
    Enable an open restriction. License or key will be delivered on every request.
    playreadyConfigurationLicenses ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense[]
    One or more playready_configuration_license blocks as defined above.
    playreadyResponseCustomData string
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    tokenRestriction ContentKeyPolicyPolicyOptionTokenRestriction
    A token_restriction block as defined below.
    widevineConfigurationTemplate string

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    name str
    The name which should be used for this Policy Option.
    clear_key_configuration_enabled bool
    Enable a configuration for non-DRM keys.
    fairplay_configuration ContentKeyPolicyPolicyOptionFairplayConfiguration
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    open_restriction_enabled bool
    Enable an open restriction. License or key will be delivered on every request.
    playready_configuration_licenses Sequence[ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense]
    One or more playready_configuration_license blocks as defined above.
    playready_response_custom_data str
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    token_restriction ContentKeyPolicyPolicyOptionTokenRestriction
    A token_restriction block as defined below.
    widevine_configuration_template str

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    name String
    The name which should be used for this Policy Option.
    clearKeyConfigurationEnabled Boolean
    Enable a configuration for non-DRM keys.
    fairplayConfiguration Property Map
    A fairplay_configuration block as defined above. Check license requirements here https://docs.microsoft.com/azure/media-services/latest/fairplay-license-overview.
    openRestrictionEnabled Boolean
    Enable an open restriction. License or key will be delivered on every request.
    playreadyConfigurationLicenses List<Property Map>
    One or more playready_configuration_license blocks as defined above.
    playreadyResponseCustomData String
    The custom response data of the PlayReady configuration. This only applies when playready_configuration_license is specified.
    tokenRestriction Property Map
    A token_restriction block as defined below.
    widevineConfigurationTemplate String

    The Widevine template.

    NOTE: Each policy_option can only have one type of configuration: fairplay_configuration, clear_key_configuration_enabled, playready_configuration_license or widevine_configuration_template. And is possible to assign only one type of restriction: open_restriction_enabled or token_restriction.

    ContentKeyPolicyPolicyOptionFairplayConfiguration, ContentKeyPolicyPolicyOptionFairplayConfigurationArgs

    Ask string
    The key that must be used as FairPlay Application Secret key.
    OfflineRentalConfiguration ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration
    A offline_rental_configuration block as defined below.
    Pfx string
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    PfxPassword string
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    RentalAndLeaseKeyType string
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    RentalDurationSeconds int
    The rental duration. Must be greater than 0.
    Ask string
    The key that must be used as FairPlay Application Secret key.
    OfflineRentalConfiguration ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration
    A offline_rental_configuration block as defined below.
    Pfx string
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    PfxPassword string
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    RentalAndLeaseKeyType string
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    RentalDurationSeconds int
    The rental duration. Must be greater than 0.
    ask String
    The key that must be used as FairPlay Application Secret key.
    offlineRentalConfiguration ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration
    A offline_rental_configuration block as defined below.
    pfx String
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    pfxPassword String
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    rentalAndLeaseKeyType String
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    rentalDurationSeconds Integer
    The rental duration. Must be greater than 0.
    ask string
    The key that must be used as FairPlay Application Secret key.
    offlineRentalConfiguration ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration
    A offline_rental_configuration block as defined below.
    pfx string
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    pfxPassword string
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    rentalAndLeaseKeyType string
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    rentalDurationSeconds number
    The rental duration. Must be greater than 0.
    ask str
    The key that must be used as FairPlay Application Secret key.
    offline_rental_configuration ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration
    A offline_rental_configuration block as defined below.
    pfx str
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    pfx_password str
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    rental_and_lease_key_type str
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    rental_duration_seconds int
    The rental duration. Must be greater than 0.
    ask String
    The key that must be used as FairPlay Application Secret key.
    offlineRentalConfiguration Property Map
    A offline_rental_configuration block as defined below.
    pfx String
    The Base64 representation of FairPlay certificate in PKCS 12 (pfx) format (including private key).
    pfxPassword String
    The password encrypting FairPlay certificate in PKCS 12 (pfx) format.
    rentalAndLeaseKeyType String
    The rental and lease key type. Supported values are DualExpiry, PersistentLimited, PersistentUnlimited or Undefined.
    rentalDurationSeconds Number
    The rental duration. Must be greater than 0.

    ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfiguration, ContentKeyPolicyPolicyOptionFairplayConfigurationOfflineRentalConfigurationArgs

    PlaybackDurationSeconds int
    Playback duration.
    StorageDurationSeconds int
    Storage duration.
    PlaybackDurationSeconds int
    Playback duration.
    StorageDurationSeconds int
    Storage duration.
    playbackDurationSeconds Integer
    Playback duration.
    storageDurationSeconds Integer
    Storage duration.
    playbackDurationSeconds number
    Playback duration.
    storageDurationSeconds number
    Storage duration.
    playback_duration_seconds int
    Playback duration.
    storage_duration_seconds int
    Storage duration.
    playbackDurationSeconds Number
    Playback duration.
    storageDurationSeconds Number
    Storage duration.

    ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicense, ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgs

    AllowTestDevices bool
    A flag indicating whether test devices can use the license.
    BeginDate string
    The begin date of license.
    ContentKeyLocationFromHeaderEnabled bool
    Specifies that the content key ID is in the PlayReady header.
    ContentKeyLocationFromKeyId string

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    ContentType string
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    ExpirationDate string
    The expiration date of license.
    GracePeriod string
    The grace period of license.
    LicenseType string
    The license type. Supported values are NonPersistent or Persistent.
    PlayRight ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight
    A play_right block as defined above.
    RelativeBeginDate string
    The relative begin date of license.
    RelativeExpirationDate string
    The relative expiration date of license.
    SecurityLevel string
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.
    AllowTestDevices bool
    A flag indicating whether test devices can use the license.
    BeginDate string
    The begin date of license.
    ContentKeyLocationFromHeaderEnabled bool
    Specifies that the content key ID is in the PlayReady header.
    ContentKeyLocationFromKeyId string

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    ContentType string
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    ExpirationDate string
    The expiration date of license.
    GracePeriod string
    The grace period of license.
    LicenseType string
    The license type. Supported values are NonPersistent or Persistent.
    PlayRight ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight
    A play_right block as defined above.
    RelativeBeginDate string
    The relative begin date of license.
    RelativeExpirationDate string
    The relative expiration date of license.
    SecurityLevel string
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.
    allowTestDevices Boolean
    A flag indicating whether test devices can use the license.
    beginDate String
    The begin date of license.
    contentKeyLocationFromHeaderEnabled Boolean
    Specifies that the content key ID is in the PlayReady header.
    contentKeyLocationFromKeyId String

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    contentType String
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    expirationDate String
    The expiration date of license.
    gracePeriod String
    The grace period of license.
    licenseType String
    The license type. Supported values are NonPersistent or Persistent.
    playRight ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight
    A play_right block as defined above.
    relativeBeginDate String
    The relative begin date of license.
    relativeExpirationDate String
    The relative expiration date of license.
    securityLevel String
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.
    allowTestDevices boolean
    A flag indicating whether test devices can use the license.
    beginDate string
    The begin date of license.
    contentKeyLocationFromHeaderEnabled boolean
    Specifies that the content key ID is in the PlayReady header.
    contentKeyLocationFromKeyId string

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    contentType string
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    expirationDate string
    The expiration date of license.
    gracePeriod string
    The grace period of license.
    licenseType string
    The license type. Supported values are NonPersistent or Persistent.
    playRight ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight
    A play_right block as defined above.
    relativeBeginDate string
    The relative begin date of license.
    relativeExpirationDate string
    The relative expiration date of license.
    securityLevel string
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.
    allow_test_devices bool
    A flag indicating whether test devices can use the license.
    begin_date str
    The begin date of license.
    content_key_location_from_header_enabled bool
    Specifies that the content key ID is in the PlayReady header.
    content_key_location_from_key_id str

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    content_type str
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    expiration_date str
    The expiration date of license.
    grace_period str
    The grace period of license.
    license_type str
    The license type. Supported values are NonPersistent or Persistent.
    play_right ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight
    A play_right block as defined above.
    relative_begin_date str
    The relative begin date of license.
    relative_expiration_date str
    The relative expiration date of license.
    security_level str
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.
    allowTestDevices Boolean
    A flag indicating whether test devices can use the license.
    beginDate String
    The begin date of license.
    contentKeyLocationFromHeaderEnabled Boolean
    Specifies that the content key ID is in the PlayReady header.
    contentKeyLocationFromKeyId String

    The content key ID. Specifies that the content key ID is specified in the PlayReady configuration.

    NOTE: You can only specify one content key location. For example if you specify content_key_location_from_header_enabled in true, you shouldn't specify content_key_location_from_key_id and vice versa.

    contentType String
    The PlayReady content type. Supported values are UltraVioletDownload, UltraVioletStreaming or Unspecified.
    expirationDate String
    The expiration date of license.
    gracePeriod String
    The grace period of license.
    licenseType String
    The license type. Supported values are NonPersistent or Persistent.
    playRight Property Map
    A play_right block as defined above.
    relativeBeginDate String
    The relative begin date of license.
    relativeExpirationDate String
    The relative expiration date of license.
    securityLevel String
    The security level of the PlayReady license. Possible values are SL150, SL2000 and SL3000. Please see this document for more information about security level. See this document for more information about SL3000 support.

    ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRight, ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightArgs

    AgcAndColorStripeRestriction int
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    AllowPassingVideoContentToUnknownOutput string
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    AnalogVideoOpl int
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    CompressedDigitalAudioOpl int
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    CompressedDigitalVideoOpl int
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    DigitalVideoOnlyContentRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ExplicitAnalogTelevisionOutputRestriction ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction
    An explicit_analog_television_output_restriction block as defined above.
    FirstPlayExpiration string
    The amount of time that the license is valid after the license is first used to play content.
    ImageConstraintForAnalogComponentVideoRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ImageConstraintForAnalogComputerMonitorRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ScmsRestriction int
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    UncompressedDigitalAudioOpl int
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    UncompressedDigitalVideoOpl int
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.
    AgcAndColorStripeRestriction int
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    AllowPassingVideoContentToUnknownOutput string
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    AnalogVideoOpl int
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    CompressedDigitalAudioOpl int
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    CompressedDigitalVideoOpl int
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    DigitalVideoOnlyContentRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ExplicitAnalogTelevisionOutputRestriction ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction
    An explicit_analog_television_output_restriction block as defined above.
    FirstPlayExpiration string
    The amount of time that the license is valid after the license is first used to play content.
    ImageConstraintForAnalogComponentVideoRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ImageConstraintForAnalogComputerMonitorRestriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    ScmsRestriction int
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    UncompressedDigitalAudioOpl int
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    UncompressedDigitalVideoOpl int
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.
    agcAndColorStripeRestriction Integer
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    allowPassingVideoContentToUnknownOutput String
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    analogVideoOpl Integer
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    compressedDigitalAudioOpl Integer
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    compressedDigitalVideoOpl Integer
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    digitalVideoOnlyContentRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    explicitAnalogTelevisionOutputRestriction ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction
    An explicit_analog_television_output_restriction block as defined above.
    firstPlayExpiration String
    The amount of time that the license is valid after the license is first used to play content.
    imageConstraintForAnalogComponentVideoRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    imageConstraintForAnalogComputerMonitorRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    scmsRestriction Integer
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    uncompressedDigitalAudioOpl Integer
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    uncompressedDigitalVideoOpl Integer
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.
    agcAndColorStripeRestriction number
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    allowPassingVideoContentToUnknownOutput string
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    analogVideoOpl number
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    compressedDigitalAudioOpl number
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    compressedDigitalVideoOpl number
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    digitalVideoOnlyContentRestriction boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    explicitAnalogTelevisionOutputRestriction ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction
    An explicit_analog_television_output_restriction block as defined above.
    firstPlayExpiration string
    The amount of time that the license is valid after the license is first used to play content.
    imageConstraintForAnalogComponentVideoRestriction boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    imageConstraintForAnalogComputerMonitorRestriction boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    scmsRestriction number
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    uncompressedDigitalAudioOpl number
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    uncompressedDigitalVideoOpl number
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.
    agc_and_color_stripe_restriction int
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    allow_passing_video_content_to_unknown_output str
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    analog_video_opl int
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    compressed_digital_audio_opl int
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    compressed_digital_video_opl int
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    digital_video_only_content_restriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    explicit_analog_television_output_restriction ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction
    An explicit_analog_television_output_restriction block as defined above.
    first_play_expiration str
    The amount of time that the license is valid after the license is first used to play content.
    image_constraint_for_analog_component_video_restriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    image_constraint_for_analog_computer_monitor_restriction bool
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    scms_restriction int
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    uncompressed_digital_audio_opl int
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    uncompressed_digital_video_opl int
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.
    agcAndColorStripeRestriction Number
    Configures Automatic Gain Control (AGC) and Color Stripe in the license. Must be between 0 and 3 inclusive.
    allowPassingVideoContentToUnknownOutput String
    Configures Unknown output handling settings of the license. Supported values are Allowed, AllowedWithVideoConstriction or NotAllowed.
    analogVideoOpl Number
    Specifies the output protection level for compressed digital audio. Supported values are 100, 150 or 200.
    compressedDigitalAudioOpl Number
    Specifies the output protection level for compressed digital audio.Supported values are 100, 150, 200, 250 or 300.
    compressedDigitalVideoOpl Number
    Specifies the output protection level for compressed digital video. Supported values are 400 or 500.
    digitalVideoOnlyContentRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    explicitAnalogTelevisionOutputRestriction Property Map
    An explicit_analog_television_output_restriction block as defined above.
    firstPlayExpiration String
    The amount of time that the license is valid after the license is first used to play content.
    imageConstraintForAnalogComponentVideoRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    imageConstraintForAnalogComputerMonitorRestriction Boolean
    Enables the Image Constraint For Analog Component Video Restriction in the license.
    scmsRestriction Number
    Configures the Serial Copy Management System (SCMS) in the license. Must be between 0 and 3 inclusive.
    uncompressedDigitalAudioOpl Number
    Specifies the output protection level for uncompressed digital audio. Supported values are 100, 150, 200, 250 or 300.
    uncompressedDigitalVideoOpl Number
    Specifies the output protection level for uncompressed digital video. Supported values are 100, 250, 270 or 300.

    ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestriction, ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicensePlayRightExplicitAnalogTelevisionOutputRestrictionArgs

    ControlBits int
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    BestEffortEnforced bool
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.
    ControlBits int
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    BestEffortEnforced bool
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.
    controlBits Integer
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    bestEffortEnforced Boolean
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.
    controlBits number
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    bestEffortEnforced boolean
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.
    control_bits int
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    best_effort_enforced bool
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.
    controlBits Number
    The restriction control bits. Possible value is integer between 0 and 3 inclusive.
    bestEffortEnforced Boolean
    Indicates whether this restriction is enforced on a best effort basis. Possible values are true or false. Defaults to false.

    ContentKeyPolicyPolicyOptionTokenRestriction, ContentKeyPolicyPolicyOptionTokenRestrictionArgs

    AlternateKeys List<ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey>
    One or more alternate_key block as defined above.
    Audience string
    The audience for the token.
    Issuer string
    The token issuer.
    OpenIdConnectDiscoveryDocument string
    The OpenID connect discovery document.
    PrimaryRsaTokenKeyExponent string
    The RSA parameter exponent.
    PrimaryRsaTokenKeyModulus string
    The RSA parameter modulus.
    PrimarySymmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    PrimaryX509TokenKeyRaw string
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    RequiredClaims List<ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim>
    One or more required_claim blocks as defined above.
    TokenType string

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    AlternateKeys []ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey
    One or more alternate_key block as defined above.
    Audience string
    The audience for the token.
    Issuer string
    The token issuer.
    OpenIdConnectDiscoveryDocument string
    The OpenID connect discovery document.
    PrimaryRsaTokenKeyExponent string
    The RSA parameter exponent.
    PrimaryRsaTokenKeyModulus string
    The RSA parameter modulus.
    PrimarySymmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    PrimaryX509TokenKeyRaw string
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    RequiredClaims []ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim
    One or more required_claim blocks as defined above.
    TokenType string

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    alternateKeys List<ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey>
    One or more alternate_key block as defined above.
    audience String
    The audience for the token.
    issuer String
    The token issuer.
    openIdConnectDiscoveryDocument String
    The OpenID connect discovery document.
    primaryRsaTokenKeyExponent String
    The RSA parameter exponent.
    primaryRsaTokenKeyModulus String
    The RSA parameter modulus.
    primarySymmetricTokenKey String
    The key value of the key. Specifies a symmetric key for token validation.
    primaryX509TokenKeyRaw String
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    requiredClaims List<ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim>
    One or more required_claim blocks as defined above.
    tokenType String

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    alternateKeys ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey[]
    One or more alternate_key block as defined above.
    audience string
    The audience for the token.
    issuer string
    The token issuer.
    openIdConnectDiscoveryDocument string
    The OpenID connect discovery document.
    primaryRsaTokenKeyExponent string
    The RSA parameter exponent.
    primaryRsaTokenKeyModulus string
    The RSA parameter modulus.
    primarySymmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    primaryX509TokenKeyRaw string
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    requiredClaims ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim[]
    One or more required_claim blocks as defined above.
    tokenType string

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    alternate_keys Sequence[ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey]
    One or more alternate_key block as defined above.
    audience str
    The audience for the token.
    issuer str
    The token issuer.
    open_id_connect_discovery_document str
    The OpenID connect discovery document.
    primary_rsa_token_key_exponent str
    The RSA parameter exponent.
    primary_rsa_token_key_modulus str
    The RSA parameter modulus.
    primary_symmetric_token_key str
    The key value of the key. Specifies a symmetric key for token validation.
    primary_x509_token_key_raw str
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    required_claims Sequence[ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim]
    One or more required_claim blocks as defined above.
    token_type str

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    alternateKeys List<Property Map>
    One or more alternate_key block as defined above.
    audience String
    The audience for the token.
    issuer String
    The token issuer.
    openIdConnectDiscoveryDocument String
    The OpenID connect discovery document.
    primaryRsaTokenKeyExponent String
    The RSA parameter exponent.
    primaryRsaTokenKeyModulus String
    The RSA parameter modulus.
    primarySymmetricTokenKey String
    The key value of the key. Specifies a symmetric key for token validation.
    primaryX509TokenKeyRaw String
    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.
    requiredClaims List<Property Map>
    One or more required_claim blocks as defined above.
    tokenType String

    The type of token. Supported values are Jwt or Swt.

    NOTE: Each token_restriction can only have one type of primary verification key: if you want to use RSA you must provide primary_rsa_token_key_exponent and primary_rsa_token_key_modulus, if you want to use symmetric you need to provide primary_symmetric_token_key and for x509 you must provide primary_x509_token_key_raw. For more information about Token access please refer to https://docs.microsoft.com/azure/media-services/latest/content-protection-overview#controlling-content-access

    ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKey, ContentKeyPolicyPolicyOptionTokenRestrictionAlternateKeyArgs

    RsaTokenKeyExponent string
    The RSA parameter exponent.
    RsaTokenKeyModulus string
    The RSA parameter modulus.
    SymmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    X509TokenKeyRaw string

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    RsaTokenKeyExponent string
    The RSA parameter exponent.
    RsaTokenKeyModulus string
    The RSA parameter modulus.
    SymmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    X509TokenKeyRaw string

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    rsaTokenKeyExponent String
    The RSA parameter exponent.
    rsaTokenKeyModulus String
    The RSA parameter modulus.
    symmetricTokenKey String
    The key value of the key. Specifies a symmetric key for token validation.
    x509TokenKeyRaw String

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    rsaTokenKeyExponent string
    The RSA parameter exponent.
    rsaTokenKeyModulus string
    The RSA parameter modulus.
    symmetricTokenKey string
    The key value of the key. Specifies a symmetric key for token validation.
    x509TokenKeyRaw string

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    rsa_token_key_exponent str
    The RSA parameter exponent.
    rsa_token_key_modulus str
    The RSA parameter modulus.
    symmetric_token_key str
    The key value of the key. Specifies a symmetric key for token validation.
    x509_token_key_raw str

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    rsaTokenKeyExponent String
    The RSA parameter exponent.
    rsaTokenKeyModulus String
    The RSA parameter modulus.
    symmetricTokenKey String
    The key value of the key. Specifies a symmetric key for token validation.
    x509TokenKeyRaw String

    The raw data field of a certificate in PKCS 12 format (X509Certificate2 in .NET). Specifies a certificate for token validation.

    NOTE: Each alternate_key block can only have one type of primary verification key: if you want to use RSA you must provide rsa_token_key_exponent and rsa_token_key_modulus, if you want to use symmetric you need to provide symmetric_token_key and for x509 you must provide x509_token_key_raw.

    ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaim, ContentKeyPolicyPolicyOptionTokenRestrictionRequiredClaimArgs

    Type string
    Token claim type.
    Value string
    Token claim value.
    Type string
    Token claim type.
    Value string
    Token claim value.
    type String
    Token claim type.
    value String
    Token claim value.
    type string
    Token claim type.
    value string
    Token claim value.
    type str
    Token claim type.
    value str
    Token claim value.
    type String
    Token claim type.
    value String
    Token claim value.

    Import

    Content Key Policy can be imported using the resource id, e.g.

    $ pulumi import azure:media/contentKeyPolicy:ContentKeyPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/contentKeyPolicies/policy1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi