你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
StorageAccountCollection.CreateOrUpdate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的参数异步创建一个新的存储帐户。 如果已创建帐户,并且发出具有不同属性的后续创建请求,则会更新帐户属性。 如果已创建帐户,并且发出具有完全相同的属性集的后续创建或更新请求,则请求将成功。
- 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
- 操作IdStorageAccounts_Create
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageAccountResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.Storage.Models.StorageAccountCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.Models.StorageAccountCreateOrUpdateContent * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageAccountResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.Models.StorageAccountCreateOrUpdateContent * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.StorageAccountResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, accountName As String, content As StorageAccountCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of StorageAccountResource)
参数
- waitUntil
- WaitUntil
Completed 如果方法应等待返回,直到服务上长时间运行的操作完成; Started 如果它应在启动操作后返回,则为 。 有关长时间运行的操作的详细信息,请参阅 Azure.Core Long-Running 操作示例。
- accountName
- String
指定资源组中的存储帐户的名称。 存储帐户名称长度必须为 3 到 24 个字符,并且只能使用数字和小写字母。
要为创建的帐户提供的参数。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
accountName
是一个空字符串,预期为非空。
accountName
或 content
为 null。