Account

Deprecated:

azure.mediaservices.Account has been deprecated in favor of azure.media.ServiceAccount

Manages a Media Services Account.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "GRS",
    });

    var exampleServiceAccount = new Azure.Media.ServiceAccount("exampleServiceAccount", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        StorageAccounts = new[]
        {
            new Azure.Media.Inputs.ServiceAccountStorageAccountArgs
            {
                Id = exampleAccount.Id,
                IsPrimary = true,
            },
        },
    });

});
package main

import (
	"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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("GRS"),
		})
		if err != nil {
			return err
		}
		_, err = media.NewServiceAccount(ctx, "exampleServiceAccount", &media.ServiceAccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			StorageAccounts: media.ServiceAccountStorageAccountArray{
				&media.ServiceAccountStorageAccountArgs{
					Id:        exampleAccount.ID(),
					IsPrimary: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="GRS")
example_service_account = azure.media.ServiceAccount("exampleServiceAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    storage_accounts=[azure.media.ServiceAccountStorageAccountArgs(
        id=example_account.id,
        is_primary=True,
    )])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "GRS",
});
const exampleServiceAccount = new azure.media.ServiceAccount("exampleServiceAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    storageAccounts: [{
        id: exampleAccount.id,
        isPrimary: true,
    }],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: GRS
  exampleServiceAccount:
    type: azure:media:ServiceAccount
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      storageAccounts:
        - id: ${exampleAccount.id}
          isPrimary: true

Create Account Resource

new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            identity: Optional[AccountIdentityArgs] = None,
            key_delivery_access_control: Optional[AccountKeyDeliveryAccessControlArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            storage_accounts: Optional[Sequence[AccountStorageAccountArgs]] = None,
            storage_authentication_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None)
@overload
def Account(resource_name: str,
            args: AccountArgs,
            opts: Optional[ResourceOptions] = None)
func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: azure:mediaservices:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AccountArgs
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 AccountArgs
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 AccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AccountArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Account 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 Account resource accepts the following input properties:

ResourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

StorageAccounts List<AccountStorageAccountArgs>

One or more storage_account blocks as defined below.

Identity AccountIdentityArgs

An identity block as defined below.

KeyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

StorageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

Tags Dictionary<string, string>

A mapping of tags assigned to the resource.

ResourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

StorageAccounts []AccountStorageAccountArgs

One or more storage_account blocks as defined below.

Identity AccountIdentityArgs

An identity block as defined below.

KeyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

StorageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

Tags map[string]string

A mapping of tags assigned to the resource.

resourceGroupName String

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts List<AccountStorageAccountArgs>

One or more storage_account blocks as defined below.

identity AccountIdentityArgs

An identity block as defined below.

keyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name String

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

storageAuthenticationType String

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Map<String,String>

A mapping of tags assigned to the resource.

resourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts AccountStorageAccountArgs[]

One or more storage_account blocks as defined below.

identity AccountIdentityArgs

An identity block as defined below.

keyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

storageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags {[key: string]: string}

A mapping of tags assigned to the resource.

resource_group_name str

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storage_accounts Sequence[AccountStorageAccountArgs]

One or more storage_account blocks as defined below.

identity AccountIdentityArgs

An identity block as defined below.

key_delivery_access_control AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name str

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

storage_authentication_type str

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Mapping[str, str]

A mapping of tags assigned to the resource.

resourceGroupName String

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts List<Property Map>

One or more storage_account blocks as defined below.

identity Property Map

An identity block as defined below.

keyDeliveryAccessControl Property Map

A key_delivery_access_control block as defined below.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name String

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

storageAuthenticationType String

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Map<String>

A mapping of tags assigned to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Account 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 Account Resource

Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        identity: Optional[AccountIdentityArgs] = None,
        key_delivery_access_control: Optional[AccountKeyDeliveryAccessControlArgs] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        storage_accounts: Optional[Sequence[AccountStorageAccountArgs]] = None,
        storage_authentication_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> Account
func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
public static Account get(String name, Output<String> id, AccountState 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:
Identity AccountIdentityArgs

An identity block as defined below.

KeyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

StorageAccounts List<AccountStorageAccountArgs>

One or more storage_account blocks as defined below.

StorageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

Tags Dictionary<string, string>

A mapping of tags assigned to the resource.

Identity AccountIdentityArgs

An identity block as defined below.

KeyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

StorageAccounts []AccountStorageAccountArgs

One or more storage_account blocks as defined below.

StorageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

Tags map[string]string

A mapping of tags assigned to the resource.

identity AccountIdentityArgs

An identity block as defined below.

keyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name String

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts List<AccountStorageAccountArgs>

One or more storage_account blocks as defined below.

storageAuthenticationType String

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Map<String,String>

A mapping of tags assigned to the resource.

identity AccountIdentityArgs

An identity block as defined below.

keyDeliveryAccessControl AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name string

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts AccountStorageAccountArgs[]

One or more storage_account blocks as defined below.

storageAuthenticationType string

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags {[key: string]: string}

A mapping of tags assigned to the resource.

identity AccountIdentityArgs

An identity block as defined below.

key_delivery_access_control AccountKeyDeliveryAccessControlArgs

A key_delivery_access_control block as defined below.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name str

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storage_accounts Sequence[AccountStorageAccountArgs]

One or more storage_account blocks as defined below.

storage_authentication_type str

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Mapping[str, str]

A mapping of tags assigned to the resource.

identity Property Map

An identity block as defined below.

keyDeliveryAccessControl Property Map

A key_delivery_access_control block as defined below.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name String

Specifies the name of the Media Services Account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which to create the Media Services Account. Changing this forces a new resource to be created.

storageAccounts List<Property Map>

One or more storage_account blocks as defined below.

storageAuthenticationType String

Specifies the storage authentication type. Possible value is ManagedIdentity or System.

tags Map<String>

A mapping of tags assigned to the resource.

Supporting Types

AccountIdentity

Type string

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

PrincipalId string

The Principal ID associated with this Managed Service Identity.

TenantId string

The Tenant ID associated with this Managed Service Identity.

Type string

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

PrincipalId string

The Principal ID associated with this Managed Service Identity.

TenantId string

The Tenant ID associated with this Managed Service Identity.

type String

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

principalId String

The Principal ID associated with this Managed Service Identity.

tenantId String

The Tenant ID associated with this Managed Service Identity.

type string

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

principalId string

The Principal ID associated with this Managed Service Identity.

tenantId string

The Tenant ID associated with this Managed Service Identity.

type str

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

principal_id str

The Principal ID associated with this Managed Service Identity.

tenant_id str

The Tenant ID associated with this Managed Service Identity.

type String

Specifies the type of Managed Service Identity that should be configured on this Media Services Account. Possible value is SystemAssigned.

principalId String

The Principal ID associated with this Managed Service Identity.

tenantId String

The Tenant ID associated with this Managed Service Identity.

AccountKeyDeliveryAccessControl

DefaultAction string

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

IpAllowLists List<string>

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

DefaultAction string

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

IpAllowLists []string

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

defaultAction String

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

ipAllowLists List<String>

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

defaultAction string

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

ipAllowLists string[]

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

default_action str

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

ip_allow_lists Sequence[str]

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

defaultAction String

The Default Action to use when no rules match from ip_allow_list. Possible values are Allow and Deny.

ipAllowLists List<String>

One or more IP Addresses, or CIDR Blocks which should be able to access the Key Delivery.

AccountStorageAccount

Id string

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

IsPrimary bool

Specifies whether the storage account should be the primary account or not. Defaults to false.

Id string

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

IsPrimary bool

Specifies whether the storage account should be the primary account or not. Defaults to false.

id String

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

isPrimary Boolean

Specifies whether the storage account should be the primary account or not. Defaults to false.

id string

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

isPrimary boolean

Specifies whether the storage account should be the primary account or not. Defaults to false.

id str

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

is_primary bool

Specifies whether the storage account should be the primary account or not. Defaults to false.

id String

Specifies the ID of the Storage Account that will be associated with the Media Services instance.

isPrimary Boolean

Specifies whether the storage account should be the primary account or not. Defaults to false.

Import

Media Services Accounts can be imported using the resource id, e.g.

 $ pulumi import azure:mediaservices/account:Account account /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Media/mediaservices/account1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.