StreamingPolicy

class StreamingPolicy : KotlinCustomResource

Manages a Streaming Policy.

Example Usage

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.StreamingPolicy;
import com.pulumi.azure.media.StreamingPolicyArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCencArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCencDefaultContentKeyArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCencDrmPlayreadyArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCbcsArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs;
import com.pulumi.azure.media.inputs.StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.build());
var exampleServiceAccount = new ServiceAccount("exampleServiceAccount", ServiceAccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.storageAccounts(ServiceAccountStorageAccountArgs.builder()
.id(exampleAccount.id())
.isPrimary(true)
.build())
.build());
var exampleContentKeyPolicy = new ContentKeyPolicy("exampleContentKeyPolicy", ContentKeyPolicyArgs.builder()
.resourceGroupName(exampleResourceGroup.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+X7eMIwQrVnD5nK7avXfbIni57n5oWLkE9Vco8uBlMdrx4xHt9vpe42Pz2Yh2O4WtvxcgxrAknvPpV1ZsAJCfvm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B/Y9n4rqEJ4Dn619h+6O7FChzWkx7kvYIzIxvfnj1PCFTEjUwc7jbuF013W/z9zQi2YEq9AzxMcGro0zjdt2sf30zXSfaRNt0UHHRDkLo7yFUJG5Ka1uWU8paLuXUUiiMUf24Bsfdg2A2n+3Qa7g25OvAM1QTpMwmMWL9sY2hxVUGIKVrnj8c4EKuGJjVDXrze5g9O/LfZr5VSjGu5KsN0eYI3mcePF7XM0azMtTNQYVRmeWxYW+XvK5MaoLEkrFG8C5+JccIlN588jowVIPqP321S/EyFiAmrRdAWkqrc9KH+/eINCFqjut2YPkCaTM9mnJAAqWgggUWkrOKT/ByS6IAQwyEBNFbY0TWyxKt6vZL1EW/6HgZCsxeYycNhnPr2qJNZZMNzmdMRp2GRLcfBH8KFw1rAyua0VJoTLHb23ZAsEY74BrEEiK9e/oOjXkHzQjlmrfQ9rSN2eQpRrn0W8I229WmBO2suG+AQ3aY8kDtBMkjmJno7txUh1K5D6tJTO7MQp343A2AhyJkhYA7NPnDA7MB8wBwYFKw4DAhoEFPO82HDlCzlshWlnMoQPStm62TMEBBQsPmvwbZ5OlwC9+NDF1AC+t67WTgICB9A=")
.pfxPassword("password")
.rentalDurationSeconds(2249)
.rentalAndLeaseKeyType("PersistentUnlimited")
.build())
.openRestrictionEnabled(true)
.build())
.build());
var exampleStreamingPolicy = new StreamingPolicy("exampleStreamingPolicy", StreamingPolicyArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.mediaServicesAccountName(exampleServiceAccount.name())
.commonEncryptionCenc(StreamingPolicyCommonEncryptionCencArgs.builder()
.clearTracks(StreamingPolicyCommonEncryptionCencClearTrackArgs.builder()
.conditions(StreamingPolicyCommonEncryptionCencClearTrackConditionArgs.builder()
.property("FourCC")
.operation("Equal")
.value("hev2")
.build())
.build())
.enabledProtocols(StreamingPolicyCommonEncryptionCencEnabledProtocolsArgs.builder()
.download(false)
.dash(true)
.hls(false)
.smoothStreaming(false)
.build())
.defaultContentKey(StreamingPolicyCommonEncryptionCencDefaultContentKeyArgs.builder()
.label("aesDefaultKey")
.policyName(exampleContentKeyPolicy.name())
.build())
.drmPlayready(StreamingPolicyCommonEncryptionCencDrmPlayreadyArgs.builder()
.customLicenseAcquisitionUrlTemplate("https://contoso.com/{AssetAlternativeId}/playready/{ContentKeyId}")
.customAttributes("PlayReady CustomAttributes")
.build())
.drmWidevineCustomLicenseAcquisitionUrlTemplate("https://contoso.com/{AssetAlternativeId}/widevine/{ContentKeyId}")
.build())
.commonEncryptionCbcs(StreamingPolicyCommonEncryptionCbcsArgs.builder()
.enabledProtocols(StreamingPolicyCommonEncryptionCbcsEnabledProtocolsArgs.builder()
.download(false)
.dash(true)
.hls(false)
.smoothStreaming(false)
.build())
.drmFairplay(StreamingPolicyCommonEncryptionCbcsDrmFairplayArgs.builder()
.customLicenseAcquisitionUrlTemplate("https://contoso.com/{AssetAlternativeId}/fairplay/{ContentKeyId}")
.allowPersistentLicense(true)
.build())
.build())
.build());
}
}

Import

Streaming Policies can be imported using the resource id, e.g.

$ pulumi import azure:media/streamingPolicy:StreamingPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/account1/streamingPolicies/policy1

Properties

Link copied to clipboard

A common_encryption_cbcs block as defined below. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard

A common_encryption_cenc block as defined below. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard

Default Content Key used by current Streaming Policy. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard

A envelope_encryption block as defined below. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The Media Services account name. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard
val name: Output<String>

The name which should be used for this Streaming Policy. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard

A no_encryption_enabled_protocols block as defined below. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the Resource Group where the Streaming Policy should exist. Changing this forces a new Streaming Policy to be created.

Link copied to clipboard
val urn: Output<String>