共用方式為


Mediaservices - Create Or Update

建立或更新媒體服務帳戶
建立或更新媒體服務帳戶

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{accountName}?api-version=2023-01-01

URI 參數

名稱 位於 必要 類型 Description
accountName
path True

string

媒體服務帳戶名稱。

resourceGroupName
path True

string

Azure 訂用帳戶內的資源組名。

subscriptionId
path True

string

Microsoft Azure 訂用帳戶的唯一標識符。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。

要求本文

名稱 必要 類型 Description
location True

string

資源所在的地理位置

identity

MediaServiceIdentity

媒體服務帳戶的受控識別。

properties.encryption

AccountEncryption

帳戶加密屬性。

properties.keyDelivery

KeyDelivery

媒體服務帳戶的金鑰傳遞屬性。

properties.minimumTlsVersion

MinimumTlsVersion

此帳戶要求允許的最低 TLS 版本。 這是選擇性屬性。 如果未指定,則會使用安全預設值。

properties.publicNetworkAccess

PublicNetworkAccess

媒體服務帳戶下的資源是否允許公用網路存取。

properties.storageAccounts

StorageAccount[]

此資源的記憶體帳戶。

properties.storageAuthentication

StorageAuthentication

tags

object

資源標籤。

回應

名稱 類型 Description
200 OK

MediaService

確定

Headers

  • Retry-After: integer
  • Location: string
  • Azure-AsyncOperation: string
201 Created

MediaService

建立時間

Headers

  • Retry-After: integer
  • Location: string
  • Azure-AsyncOperation: string
Other Status Codes

ErrorResponse

詳細的錯誤資訊。

範例

Create a Media Services account
Create a Media Services account-managed-identity

Create a Media Services account

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports?api-version=2023-01-01

{
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "properties": {
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount",
        "type": "Primary"
      }
    ]
  }
}

Sample Response

azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationStatuses/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-01-01
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-01-01
{
  "name": "contososports",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports",
  "type": "Microsoft.Media/mediaservices",
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
    }
  },
  "properties": {
    "provisioningState": "InProgress",
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/teststorageaccount",
        "type": "Primary"
      }
    ]
  }
}
{
  "name": "contososports",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports",
  "type": "Microsoft.Media/mediaservices",
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/contososportsstore",
        "type": "Primary"
      }
    ]
  }
}

Create a Media Services account-managed-identity

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports?api-version=2023-01-01

{
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
    }
  },
  "properties": {
    "encryption": {
      "type": "CustomerKey",
      "identity": {
        "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
        "useSystemAssignedIdentity": false
      }
    },
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/contososportsstore",
        "type": "Primary",
        "identity": {
          "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
          "useSystemAssignedIdentity": false
        }
      }
    ],
    "storageAuthentication": "ManagedIdentity",
    "publicNetworkAccess": "Enabled",
    "keyDelivery": {
      "accessControl": {
        "defaultAction": "Allow"
      }
    }
  }
}

Sample Response

azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationStatuses/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-01-01
location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Media/locations/westus2/mediaServicesOperationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-01-01
{
  "name": "contososports",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports",
  "type": "Microsoft.Media/mediaservices",
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
    }
  },
  "properties": {
    "provisioningState": "InProgress",
    "encryption": {
      "type": "CustomerKey",
      "keyVaultProperties": {
        "keyIdentifier": "https://keyvault.vault.azure.net/keys/key1",
        "currentKeyIdentifier": "https://keyvault.vault.azure.net/keys/key1/ver1"
      },
      "identity": {
        "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
        "useSystemAssignedIdentity": false
      }
    },
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/contososportsstore",
        "type": "Primary",
        "identity": {
          "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
          "useSystemAssignedIdentity": false
        }
      }
    ],
    "storageAuthentication": "ManagedIdentity",
    "publicNetworkAccess": "Enabled",
    "keyDelivery": {
      "accessControl": {
        "defaultAction": "Allow"
      }
    },
    "privateEndpointConnections": [
      {
        "name": "00000000-0000-0000-0000-000000000001",
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000001",
        "type": "Microsoft.Media/mediaservices/privateEndpointConnections",
        "properties": {
          "provisioningState": "Succeeded",
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": "test description"
          },
          "privateEndpoint": {
            "id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"
          }
        }
      },
      {
        "name": "00000000-0000-0000-0000-000000000002",
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000002",
        "type": "Microsoft.Media/mediaservices/privateEndpointConnections",
        "properties": {
          "provisioningState": "Succeeded",
          "privateLinkServiceConnectionState": {
            "status": "Pending",
            "description": "test description"
          },
          "privateEndpoint": {
            "id": "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"
          }
        }
      }
    ]
  }
}
{
  "name": "contososports",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports",
  "type": "Microsoft.Media/mediaservices",
  "location": "South Central US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
      "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
    }
  },
  "properties": {
    "provisioningState": "InProgress",
    "encryption": {
      "type": "CustomerKey",
      "keyVaultProperties": {
        "keyIdentifier": "https://keyvault.vault.azure.net/keys/key1",
        "currentKeyIdentifier": "https://keyvault.vault.azure.net/keys/key1/ver1"
      },
      "identity": {
        "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
        "useSystemAssignedIdentity": false
      }
    },
    "storageAccounts": [
      {
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Storage/storageAccounts/contososportsstore",
        "type": "Primary",
        "identity": {
          "userAssignedIdentity": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
          "useSystemAssignedIdentity": false
        }
      }
    ],
    "storageAuthentication": "ManagedIdentity",
    "publicNetworkAccess": "Enabled",
    "keyDelivery": {
      "accessControl": {
        "defaultAction": "Allow"
      }
    },
    "privateEndpointConnections": [
      {
        "name": "00000000-0000-0000-0000-000000000001",
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000001",
        "type": "Microsoft.Media/mediaservices/privateEndpointConnections",
        "properties": {
          "provisioningState": "Succeeded",
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "description": "test description"
          },
          "privateEndpoint": {
            "id": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/reosuceGroup1/providers/Microsoft.Network/privateEndpoints/pe1"
          }
        }
      },
      {
        "name": "00000000-0000-0000-0000-000000000002",
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosorg/providers/Microsoft.Media/mediaservices/contososports/privateEndpointConnections/00000000-0000-0000-0000-000000000002",
        "type": "Microsoft.Media/mediaservices/privateEndpointConnections",
        "properties": {
          "provisioningState": "Succeeded",
          "privateLinkServiceConnectionState": {
            "status": "Pending",
            "description": "test description"
          },
          "privateEndpoint": {
            "id": "/subscriptions/22222222-2222-2222-2222-222222222222/resourceGroups/reosuceGroup2/providers/Microsoft.Network/privateEndpoints/pe2"
          }
        }
      }
    ]
  }
}

定義

名稱 Description
AccessControl
AccountEncryption
AccountEncryptionKeyType

用來加密帳戶金鑰的金鑰類型。

createdByType

建立資源的身分識別類型。

DefaultAction

金鑰傳遞中的IP存取控制行為。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

KeyDelivery
KeyVaultProperties
MediaService

媒體服務帳戶。

MediaServiceIdentity
MinimumTlsVersion

此帳戶要求允許的最低 TLS 版本。 這是選擇性屬性。 如果未指定,則會使用安全的預設值。

PrivateEndpoint

私人端點資源。

PrivateEndpointConnection

私人端點聯機資源。

PrivateEndpointConnectionProvisioningState

目前的布建狀態。

PrivateEndpointServiceConnectionStatus

私人端點連線狀態。

PrivateLinkServiceConnectionState

服務取用者與提供者之間連線狀態的相關信息集合。

ProvisioningState

媒體服務帳戶的布建狀態。

PublicNetworkAccess

媒體服務帳戶下的資源是否允許公用網路存取。

ResourceIdentity
StorageAccount

記憶體帳戶詳細數據。

StorageAccountType

記憶體帳戶的類型。

StorageAuthentication
systemData

與建立和上次修改資源相關的元數據。

UserAssignedManagedIdentity

AccessControl

名稱 類型 Description
defaultAction

DefaultAction

金鑰傳遞中的IP存取控制行為。

ipAllowList

string[]

金鑰傳遞中存取控制的IP允許清單。 如果預設動作設定為 [允許],IP 允許清單必須是空的。

AccountEncryption

名稱 類型 Description
identity

ResourceIdentity

金鑰保存庫 身分識別。

keyVaultProperties

KeyVaultProperties

用來加密帳戶之金鑰的屬性。

status

string

金鑰保存庫 對應的目前狀態。

type

AccountEncryptionKeyType

用來加密帳戶金鑰的金鑰類型。

AccountEncryptionKeyType

用來加密帳戶金鑰的金鑰類型。

名稱 類型 Description
CustomerKey

string

帳戶金鑰會使用客戶金鑰加密。

SystemKey

string

帳戶金鑰會以系統金鑰加密。

createdByType

建立資源的身分識別類型。

名稱 類型 Description
Application

string

Key

string

ManagedIdentity

string

User

string

DefaultAction

金鑰傳遞中的IP存取控制行為。

名稱 類型 Description
Allow

string

允許所有公用IP位址。

Deny

string

公用IP位址遭到封鎖。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

KeyDelivery

名稱 類型 Description
accessControl

AccessControl

金鑰傳遞的存取控制屬性。

KeyVaultProperties

名稱 類型 Description
currentKeyIdentifier

string

用來加密媒體服務帳戶的目前密鑰,包括金鑰版本。

keyIdentifier

string

用來加密帳戶之 金鑰保存庫 金鑰的 URL。 例如 https://vault/keys/mykey/version1) ,索引鍵可以是 (版本,或是參考沒有版本 (的索引鍵,例如 https://vault/keys/mykey).

MediaService

媒體服務帳戶。

名稱 類型 預設值 Description
id

string

資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

MediaServiceIdentity

媒體服務帳戶的受控識別。

location

string

資源所在的地理位置

name

string

資源的名稱

properties.encryption

AccountEncryption

帳戶加密屬性。

properties.keyDelivery

KeyDelivery

媒體服務帳戶的金鑰傳遞屬性。

properties.mediaServiceId

string

媒體服務帳戶標識碼。

properties.minimumTlsVersion

MinimumTlsVersion

Tls12

此帳戶要求允許的最低 TLS 版本。 這是選擇性屬性。 如果未指定,則會使用安全的預設值。

properties.privateEndpointConnections

PrivateEndpointConnection[]

為媒體服務帳戶建立的私人端點 Connections。

properties.provisioningState

ProvisioningState

媒體服務帳戶的布建狀態。

properties.publicNetworkAccess

PublicNetworkAccess

媒體服務帳戶下的資源是否允許公用網路存取。

properties.storageAccounts

StorageAccount[]

此資源的記憶體帳戶。

properties.storageAuthentication

StorageAuthentication

systemData

systemData

與此資源相關的系統元數據。

tags

object

資源標籤。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

MediaServiceIdentity

名稱 類型 Description
principalId

string

身分識別的主體標識碼。

tenantId

string

身分識別的租用戶標識碼。

type

string

識別類型。

userAssignedIdentities

<string,  UserAssignedManagedIdentity>

使用者指派的受控識別。

MinimumTlsVersion

此帳戶要求允許的最低 TLS 版本。 這是選擇性屬性。 如果未指定,則會使用安全的預設值。

名稱 類型 Description
Tls10

string

TLS 最低版本為 TLS 1.0。

Tls11

string

TLS 最低版本為 TLS 1.1。

Tls12

string

TLS 最低版本是 TLS 1.2。

Tls13

string

TLS 最低版本為 TLS 1.3。

PrivateEndpoint

私人端點資源。

名稱 類型 Description
id

string

私人端點的ARM標識碼

PrivateEndpointConnection

私人端點聯機資源。

名稱 類型 Description
id

string

資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.privateEndpoint

PrivateEndpoint

私人端點的資源。

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

服務取用者與提供者之間連線狀態的相關信息集合。

properties.provisioningState

PrivateEndpointConnectionProvisioningState

私人端點聯機資源的布建狀態。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

PrivateEndpointConnectionProvisioningState

目前的布建狀態。

名稱 類型 Description
Creating

string

Deleting

string

Failed

string

Succeeded

string

PrivateEndpointServiceConnectionStatus

私人端點連線狀態。

名稱 類型 Description
Approved

string

Pending

string

Rejected

string

PrivateLinkServiceConnectionState

服務取用者與提供者之間連線狀態的相關信息集合。

名稱 類型 Description
actionsRequired

string

訊息,指出服務提供者上的變更是否需要在取用者上進行任何更新。

description

string

連接核准/拒絕的原因。

status

PrivateEndpointServiceConnectionStatus

指出服務擁有者是否已核准/拒絕/移除連線。

ProvisioningState

媒體服務帳戶的布建狀態。

名稱 類型 Description
Failed

string

布建狀態失敗。

InProgress

string

進行中布建狀態。

Succeeded

string

布建狀態成功。

PublicNetworkAccess

媒體服務帳戶下的資源是否允許公用網路存取。

名稱 類型 Description
Disabled

string

公用網路存取已停用。

Enabled

string

已啟用公用網路存取。

ResourceIdentity

名稱 類型 Description
useSystemAssignedIdentity

boolean

指出是否要使用系統指派的受控識別。 與使用者指派的受控識別互斥。

userAssignedIdentity

string

使用者指派受控識別的 ARM 識別碼,以在存取資源時使用。

StorageAccount

記憶體帳戶詳細數據。

名稱 類型 Description
id

string

記憶體帳戶資源的標識碼。 媒體服務依賴數據表和佇列以及 Blob,因此主要記憶體帳戶必須是標準記憶體帳戶, (Microsoft.ClassicStorage 或 Microsoft.Storage) 。 只有 Blob 的記憶體帳戶可以新增為次要記憶體帳戶。

identity

ResourceIdentity

記憶體帳戶身分識別。

status

string

記憶體帳戶對應的目前狀態。

type

StorageAccountType

記憶體帳戶的類型。

StorageAccountType

記憶體帳戶的類型。

名稱 類型 Description
Primary

string

媒體服務帳戶的主要記憶體帳戶。

Secondary

string

媒體服務帳戶的次要記憶體帳戶。

StorageAuthentication

名稱 類型 Description
ManagedIdentity

string

受控識別驗證。

System

string

系統驗證。

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string

資源建立的時間戳 (UTC) 。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。

UserAssignedManagedIdentity

名稱 類型 Description
clientId

string

用戶端 ID。

principalId

string

主體標識碼。