New-AzMediaService
Creates a media service if the media service already exists, all its properties are updated with the input provided.
Składnia
StorageAccountIdParamSet
New-AzMediaService
[-ResourceGroupName] <String>
[-AccountName] <String>
[-Location] <String>
[-StorageAccountId] <String>
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
StorageAccountsParamSet
New-AzMediaService
[-ResourceGroupName] <String>
[-AccountName] <String>
[-Location] <String>
[-StorageAccounts] <PSStorageAccount[]>
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Opis
The New-AzMediaService cmdlet creates a media service.
If the media service already exists, this cmdlet update its properties.
Przykłady
# Variables
## Global
$ResourceGroupName = "ResourceGroup001"
$Location = "East US"
## Storage
$StorageName = "Storage1"
$StorageType = "Standard_GRS"
## Media Service
$Tags = @{"tag1" = "value1"; "tag2" = "value2"}
$MediaServiceName = "MediaService1"
# Resource Group
New-AzResourceGroup -Name $ResourceGroupName -Location $Location
# Storage
$StorageAccount = New-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName -Location $Location -Type $StorageType
# Media Service
New-AzMediaService -ResourceGroupName $ResourceGroupName -AccountName $MediaServiceName -Location $Location -StorageAccountId $StorageAccount.Id -Tag $Tags
This example shows how to create a media service with specifying primary storage account only.
This script uses several other cmdlets.
# Variables
## Global
$ResourceGroupName = "ResourceGroup001"
$Location = "East US"
## Storage
$StorageName1 = "storage1"
$StorageName2 = "storage2"
$StorageType = "Standard_GRS"
## Media Service
$Tags = @{"tag1" = "value1"; "tag2" = "value2"}
$MediaServiceName = "MediaService1"
# Resource Group
New-AzResourceGroup -Name $ResourceGroupName -Location $Location
# Storage
$StorageAccount1 = New-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName1 -Location $Location -Type $StorageType
$StorageAccount2 = New-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName2 -Location $Location -Type $StorageType
# Media Service
## Setup the storage configuration object.
$PrimaryStorageAccount = New-AzMediaServiceStorageConfig -StorageAccountId $StorageAccount1.Id -IsPrimary
$SecondaryStorageAccount = New-AzMediaServiceStorageConfig -StorageAccountId $StorageAccount2.Id
$StorageAccounts = @($PrimaryStorageAccount, $SecondaryStorageAccount)
## Create a media service.New-AzMediaService -ResourceGroupName $ResourceGroupName -AccountName $MediaServiceName -Location $Location -StorageAccounts $StorageAccounts -Tag $Tags
This example shows how to create a media service with multiple storage accounts.
This script uses several other cmdlets.
Parametry
-AccountName
Specifies the name of the media service that this cmdlet creates.
Właściwości parametru
Typ: String
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Aliasy: Name, ResourceName
Zestawy parametrów
(All)
Position: 1
Obowiązkowy: True
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: True
Wartość z pozostałych argumentów: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Właściwości parametru
Typ: SwitchParameter
Domyślna wartość: False
Obsługuje symbole wieloznaczne: False
DontShow: False
Aliasy: cf
Zestawy parametrów
(All)
Position: Named
Obowiązkowy: False
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: False
Wartość z pozostałych argumentów: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Właściwości parametru
Typ: IAzureContextContainer
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Aliasy: AzContext, AzureRmContext, AzureCredential
Zestawy parametrów
(All)
Position: Named
Obowiązkowy: False
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: False
Wartość z pozostałych argumentów: False
-Location
Specifies the region that this cmdlet creates the media service in.
Właściwości parametru
Typ: String
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Zestawy parametrów
(All)
Position: 2
Obowiązkowy: True
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: True
Wartość z pozostałych argumentów: False
-ResourceGroupName
Specifies the name of the resource group that the media service is assigned to.
Właściwości parametru
Typ: String
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Zestawy parametrów
(All)
Position: 0
Obowiązkowy: True
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: True
Wartość z pozostałych argumentów: False
-StorageAccountId
Specifies the storage account associated with the media service account.
Właściwości parametru
Typ: String
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Aliasy: Id
Zestawy parametrów
StorageAccountIdParamSet
Position: 3
Obowiązkowy: True
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: True
Wartość z pozostałych argumentów: False
-StorageAccounts
Specifies an array of storage accounts to associate with the media service.
Właściwości parametru
Typ: PSStorageAccount [ ]
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Zestawy parametrów
StorageAccountsParamSet
Position: 3
Obowiązkowy: True
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: True
Wartość z pozostałych argumentów: False
-Tag
The tags associated with the media service account.
Właściwości parametru
Typ: Hashtable
Domyślna wartość: None
Obsługuje symbole wieloznaczne: False
DontShow: False
Zestawy parametrów
(All)
Position: Named
Obowiązkowy: False
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: False
Wartość z pozostałych argumentów: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Właściwości parametru
Typ: SwitchParameter
Domyślna wartość: False
Obsługuje symbole wieloznaczne: False
DontShow: False
Aliasy: wi
Zestawy parametrów
(All)
Position: Named
Obowiązkowy: False
Wartość z potoku: False
Wartość z potoku według nazwy właściwości: False
Wartość z pozostałych argumentów: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Dane wyjściowe