Partager via


ShareClient.CreateIfNotExistsAsync Méthode

Définition

Surcharges

CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken)

L'opération CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken) crée un partage sous le compte spécifié. Si un partage portant le même nom existe déjà, il n’est pas modifié.

Pour plus d'informations, consultez la rubrique Créer un partage.

CreateIfNotExistsAsync(ShareCreateOptions, CancellationToken)

L'opération CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken) crée un partage sous le compte spécifié. Si un partage portant le même nom existe déjà, il n’est pas modifié.

Pour plus d'informations, consultez la rubrique Créer un partage.

CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken)

Source:
ShareClient.cs
Source:
ShareClient.cs

L'opération CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken) crée un partage sous le compte spécifié. Si un partage portant le même nom existe déjà, il n’est pas modifié.

Pour plus d'informations, consultez la rubrique Créer un partage.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>> CreateIfNotExistsAsync (System.Collections.Generic.IDictionary<string,string> metadata = default, int? quotaInGB = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateIfNotExistsAsync : System.Collections.Generic.IDictionary<string, string> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
override this.CreateIfNotExistsAsync : System.Collections.Generic.IDictionary<string, string> * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
Public Overridable Function CreateIfNotExistsAsync (Optional metadata As IDictionary(Of String, String) = Nothing, Optional quotaInGB As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareInfo))

Paramètres

metadata
IDictionary<String,String>

Métadonnées personnalisées facultatives à définir pour ce partage.

quotaInGB
Nullable<Int32>

facultatif. Taille maximale du partage en octets. Si elle n’est pas spécifiée, utilisez la valeur par défaut du service.

cancellationToken
CancellationToken

Facultatif CancellationToken pour propager des notifications indiquant que l’opération doit être annulée.

Retours

Response<T> décrivant le partage nouvellement créé. Si le partage existe déjà, null.

Remarques

Un RequestFailedException sera levée en cas d’échec.

S’applique à

CreateIfNotExistsAsync(ShareCreateOptions, CancellationToken)

Source:
ShareClient.cs
Source:
ShareClient.cs

L'opération CreateIfNotExistsAsync(IDictionary<String,String>, Nullable<Int32>, CancellationToken) crée un partage sous le compte spécifié. Si un partage portant le même nom existe déjà, il n’est pas modifié.

Pour plus d'informations, consultez la rubrique Créer un partage.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>> CreateIfNotExistsAsync (Azure.Storage.Files.Shares.Models.ShareCreateOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateIfNotExistsAsync : Azure.Storage.Files.Shares.Models.ShareCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
override this.CreateIfNotExistsAsync : Azure.Storage.Files.Shares.Models.ShareCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
Public Overridable Function CreateIfNotExistsAsync (options As ShareCreateOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareInfo))

Paramètres

options
ShareCreateOptions

Paramètres facultatifs.

cancellationToken
CancellationToken

Facultatif CancellationToken pour propager des notifications indiquant que l’opération doit être annulée.

Retours

Response<T> décrivant le partage nouvellement créé. Si le partage existe déjà, null.

Remarques

Un RequestFailedException sera levée en cas d’échec.

S’applique à