Skip to content

azurermMediaStreamingEndpoint

Manages a Streaming Endpoint.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "media-resources",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "GRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestoracc",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermMediaServicesAccountExample =
  new azurerm.mediaServicesAccount.MediaServicesAccount(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "examplemediaacc",
    resource_group_name: azurermResourceGroupExample.name,
    storage_account: [
      {
        id: azurermStorageAccountExample.id,
        is_primary: true,
      },
    ],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaServicesAccountExample.overrideLogicalId("example");
const azurermMediaStreamingEndpointExample =
  new azurerm.mediaStreamingEndpoint.MediaStreamingEndpoint(this, "example_3", {
    location: azurermResourceGroupExample.location,
    media_services_account_name: azurermMediaServicesAccountExample.name,
    name: "endpoint1",
    resource_group_name: azurermResourceGroupExample.name,
    scale_units: 2,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaStreamingEndpointExample.overrideLogicalId("example");

Example Usage with Access Control

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "media-resources",
  }
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
  this,
  "example_1",
  {
    account_replication_type: "GRS",
    account_tier: "Standard",
    location: azurermResourceGroupExample.location,
    name: "examplestoracc",
    resource_group_name: azurermResourceGroupExample.name,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermMediaServicesAccountExample =
  new azurerm.mediaServicesAccount.MediaServicesAccount(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "examplemediaacc",
    resource_group_name: azurermResourceGroupExample.name,
    storage_account: [
      {
        id: azurermStorageAccountExample.id,
        is_primary: true,
      },
    ],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaServicesAccountExample.overrideLogicalId("example");
const azurermMediaStreamingEndpointExample =
  new azurerm.mediaStreamingEndpoint.MediaStreamingEndpoint(this, "example_3", {
    access_control: [
      {
        akamai_signature_header_authentication_key: [
          {
            base64_key: "dGVzdGlkMQ==",
            expiration: "2030-12-31T16:00:00Z",
            identifier: "id1",
          },
          {
            base64_key: "dGVzdGlkMQ==",
            expiration: "2032-01-28T16:00:00Z",
            identifier: "id2",
          },
        ],
        ip_allow: [
          {
            address: "192.168.1.1",
            name: "AllowedIP",
          },
          {
            address: "192.168.1.2",
            name: "AnotherIp",
          },
        ],
      },
    ],
    location: azurermResourceGroupExample.location,
    media_services_account_name: azurermMediaServicesAccountExample.name,
    name: "endpoint1",
    resource_group_name: azurermResourceGroupExample.name,
    scale_units: 2,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMediaStreamingEndpointExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • location - (Required) The Azure Region where the Streaming Endpoint should exist. Changing this forces a new Streaming Endpoint to be created.

  • mediaServicesAccountName - (Required) The Media Services account name. Changing this forces a new Streaming Endpoint to be created.

  • name - (Required) The name which should be used for this Streaming Endpoint maximum length is 24. Changing this forces a new Streaming Endpoint to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Streaming Endpoint should exist. Changing this forces a new Streaming Endpoint to be created.

  • scaleUnits - (Required) The number of scale units. To create a Standard Streaming Endpoint set 0. For Premium Streaming Endpoint valid values are between 1 and 10.


  • accessControl - (Optional) A accessControl block as defined below.

  • autoStartEnabled - (Optional) The flag indicates if the resource should be automatically started on creation.

  • cdnEnabled - (Optional) The CDN enabled flag.

  • cdnProfile - (Optional) The CDN profile name.

  • cdnProvider - (Optional) The CDN provider name. Supported value are standardVerizon,premiumVerizon and standardAkamai

  • crossSiteAccessPolicy - (Optional) A crossSiteAccessPolicy block as defined below.

  • customHostNames - (Optional) The custom host names of the streaming endpoint.

  • description - (Optional) The streaming endpoint description.

  • maxCacheAgeSeconds - (Optional) Max cache age in seconds.

  • tags - (Optional) A mapping of tags which should be assigned to the Streaming Endpoint.


A accessControl block supports the following:

  • akamaiSignatureHeaderAuthenticationKey - (Optional) One or more akamaiSignatureHeaderAuthenticationKey blocks as defined below.

  • ipAllow - (Optional) A ipAllow block as defined below.


A akamaiSignatureHeaderAuthenticationKey block supports the following:

  • base64Key - (Optional) Authentication key.

  • expiration - (Optional) The expiration time of the authentication key.

  • identifier - (Optional) Identifier of the key.


A ipAllow block supports the following:

  • address - (Optional) The IP address to allow.

  • name - (Optional) The friendly name for the IP address range.

  • subnetPrefixLength - (Optional) The subnet mask prefix length (see CIDR notation).


A crossSiteAccessPolicy block supports the following:

  • clientAccessPolicy - (Optional) The content of clientaccesspolicyXml used by Silverlight.

  • crossDomainPolicy - (Optional) The content of crossdomainXml used by Silverlight.


Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Streaming Endpoint.

  • hostName - The host name of the Streaming Endpoint.

  • sku - A sku block defined as below.


A sku block supports the following:

  • name - The sku name of Streaming Endpoint.

  • capacity - The sku capacity of Streaming Endpoint.


Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Streaming Endpoint.
  • read - (Defaults to 5 minutes) Used when retrieving the Streaming Endpoint.
  • update - (Defaults to 30 minutes) Used when updating the Streaming Endpoint.
  • delete - (Defaults to 30 minutes) Used when deleting the Streaming Endpoint.

Import

Streaming Endpoints can be imported using the resourceId, e.g.

terraform import azurerm_media_streaming_endpoint.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Media/mediaServices/service1/streamingEndpoints/endpoint1