Long-Running Operations
This doc details what emitters will generate for long-running operations.
Resource create or replace
Long-running operation to create or replace a resource.
alias ResourceOperations = global.Azure.Core.ResourceOperations<NoConditionalRequests & NoRepeatableRequests & NoClientRequestId>;
/** Details about a user. */@resource("users")model User { /** The name of user. */ @key @visibility("read") name: string;
/** The role of user */ role: string;}
// Operation for polling the status of the LRO. SDK may exclude this operation from client.@sharedRouteop getOperationStatus is ResourceOperations.GetResourceOperationStatus<User, never>;
/** Create or replace the User. */@pollingOperation(getOperationStatus)op createOrReplace is ResourceOperations.LongRunningResourceCreateOrReplace<User>;
def begin_create_or_replace( self, name: str, resource: Union[User, JSON, IO[bytes]], **kwargs: Any) -> LROPoller[User]
public SyncPoller<PollOperationDetails, User> beginCreateOrReplace(String name, User resource);
Resource delete
Long-running operation to delete a resource.
alias ResourceOperations = global.Azure.Core.ResourceOperations<NoConditionalRequests & NoRepeatableRequests & NoClientRequestId>;
/** Details about a user. */@resource("users")model User { /** The name of user. */ @key @visibility("read") name: string;
/** The role of user */ role: string;}
// Operation for polling the status of the LRO. SDK may exclude this operation from client.@sharedRouteop getOperationStatus is ResourceOperations.GetResourceOperationStatus<User, never>;
/** Delete the User. */@pollingOperation(getOperationStatus)op delete is ResourceOperations.LongRunningResourceDelete<User>;
def begin_delete(self, name: str, **kwargs: Any) -> LROPoller[None]
public SyncPoller<PollOperationDetails, Void> beginDelete(String name);
Resource action
Long-running operation to invoke an action on a resource.
alias ResourceOperations = global.Azure.Core.ResourceOperations<NoConditionalRequests & NoRepeatableRequests & NoClientRequestId>;
/** Details about a user. */@resource("users")model User { /** The name of user. */ @key @visibility("read") name: string;
/** The role of user */ role: string;}
/** The parameters for exporting a user. */model UserExportParams { /** The format of the data. */ @query format: string;}
/** The exported user data. */model ExportedUser { /** The name of user. */ name: string;
/** The exported URI. */ resourceUri: string;}
// Operation for polling the status of the LRO. SDK may exclude this operation from client.@sharedRouteop getExportOperationStatus is ResourceOperations.GetResourceOperationStatus<User, ExportedUser>;
/** Action to export the data of the User. */@pollingOperation(getExportOperationStatus)op export is ResourceOperations.LongRunningResourceAction<User, UserExportParams, ExportedUser>;
def begin_export(self, name: str, *, format: str, **kwargs: Any) -> LROPoller[ExportedUser]
public SyncPoller<PollOperationDetails, ExportedUser> beginExport(String name, String format);