你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
FileShareCollection.CreateOrUpdate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
按请求正文所述,在指定帐户下创建新共享。 共享资源包括该共享的元数据和属性。 不包括该共享所包含的文件的列表。
- 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}
- 操作IdFileShares_Create
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.FileShareResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string shareName, Azure.ResourceManager.Storage.FileShareData data, string expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.FileShareData * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.FileShareResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.FileShareData * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.FileShareResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, shareName As String, data As FileShareData, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of FileShareResource)
参数
- waitUntil
- WaitUntil
Completed 如果方法应等待返回,直到服务上长时间运行的操作完成; Started 如果它应在启动操作后返回,则为 。 有关长时间运行的操作的详细信息,请参阅 Azure.Core Long-Running 操作示例。
- shareName
- String
指定存储帐户中的文件共享的名称。 文件共享名称的长度必须介于 3 到 63 个字符之间,并且仅使用数字、小写字母和短划线 () 。 每个短划线(-)字符的前后必须紧跟字母或数字。
- data
- FileShareData
要创建的文件共享的属性。
- expand
- String
可选,用于扩展共享属性中的属性。 有效值为:快照。 应作为带分隔符“,”的字符串传递。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
shareName
是一个空字符串,预期为非空。
shareName
或 data
为 null。