Udostępnij za pośrednictwem


FabricClient.PropertyManagementClient.CreateNameAsync Method

Definition

Overloads

CreateNameAsync(Uri)

Creates the specified Service Fabric name.

CreateNameAsync(Uri, TimeSpan, CancellationToken)

Creates the specified Service Fabric name.

CreateNameAsync(Uri)

Creates the specified Service Fabric name.

public System.Threading.Tasks.Task CreateNameAsync (Uri name);
member this.CreateNameAsync : Uri -> System.Threading.Tasks.Task
Public Function CreateNameAsync (name As Uri) As Task

Parameters

name
Uri

The Service Fabric name.

Returns

A task that represents the asynchronous create operation.

Exceptions

Caused by one of the following:

E_INVALIDARG is returned when one or more arguments are not valid.

Caused by one of the following:

E_POINTER is returned when a null reference is passed to a method that does not accept it as a valid argument.

NameAlreadyExists is returned when the Service Fabric name already exists.

Caused by one of the following:

E_ABORT is returned when operation was aborted.

Caused by one of the following:

InvalidNameUri is returned when name is not a valid Service Fabric name.

See also https://docs.microsoft.com/azure/service-fabric/service-fabric-errors-and-exceptions for handling common FabricClient failures.

This exception is thrown when an internal error has occurred.

Remarks

Timeout for the operation will be set to default timeout (1 minute).

Applies to

CreateNameAsync(Uri, TimeSpan, CancellationToken)

Creates the specified Service Fabric name.

public System.Threading.Tasks.Task CreateNameAsync (Uri name, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.CreateNameAsync : Uri * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CreateNameAsync (name As Uri, timeout As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

name
Uri

The Service Fabric name.

timeout
TimeSpan

The maximum amount of time the system will allow this operation to continue before returning TimeoutException.

cancellationToken
CancellationToken

The CancellationToken that the operation is observing. It can be used to propagate notification that the operation should be canceled.

Returns

A task that represents the asynchronous create operation.

Exceptions

Caused by one of the following:

E_INVALIDARG is returned when one or more arguments are not valid.

Caused by one of the following:

E_POINTER is returned when a null reference is passed to a method that does not accept it as a valid argument.

NameAlreadyExists is returned when the Service Fabric name already exists.

Caused by one of the following:

E_ABORT is returned when operation was aborted.

Caused by one of the following:

InvalidNameUri is returned when name is not a valid Service Fabric name.

See also https://docs.microsoft.com/azure/service-fabric/service-fabric-errors-and-exceptions for handling common FabricClient failures.

This exception is thrown when an internal error has occurred.

Remarks

Timeout for the operation will be set to default timeout (1 minute).

Applies to