Skip to main content
Version: Latest (Core: 0.57.x, Azure: 0.43.x)

Interfaces and Operations

Azure.Core​

ResourceOperations​

Interface containing common resource operations.

interface Azure.Core.ResourceOperations<InterfaceTraits, ErrorResponse>

Template Parameters​

NameDescription
InterfaceTraitsTraits applicable to the operations.
ErrorResponseError response of the operations. If not specified, the default error response is used.

ResourceOperations.ResourceCreateOrReplace​

Create or replace operation template.

op Azure.Core.ResourceOperations.ResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201 } | { statusCode: 200 } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceCreateOrReplace​

Long-running resource create or replace operation template.

op Azure.Core.ResourceOperations.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceCreateOrUpdate​

Create or update operation template.

op Azure.Core.ResourceOperations.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201 } | { statusCode: 200 } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceCreateOrUpdate​

Long-running resource create or update operation template.

op Azure.Core.ResourceOperations.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceUpdate​

Resource update operation template.

op Azure.Core.ResourceOperations.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200 } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceCreateWithServiceProvidedName​

Resource create with service-provided name operation template.

op Azure.Core.ResourceOperations.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 201, location: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceCreateWithServiceProvidedName​

Long-running resource create with service-provided name operation template.

op Azure.Core.ResourceOperations.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 202, location: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceRead​

Resource read operation template.

op Azure.Core.ResourceOperations.ResourceRead(apiVersion: string): {} | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceDelete​

Resource delete operation template.

op Azure.Core.ResourceOperations.ResourceDelete(apiVersion: string): Azure.Core.{ statusCode: 204 } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceDelete​

Long-running resource delete operation template.

op Azure.Core.ResourceOperations.LongRunningResourceDelete(apiVersion: string): { statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: Azure.Core.Foundations.Error, result: never, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceList​

Resource list operation template.

op Azure.Core.ResourceOperations.ResourceList(apiVersion: string): Azure.Core.Foundations.CustomPage<Resource, Traits> | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceAction​

Resource action operation template.

op Azure.Core.ResourceOperations.ResourceAction(apiVersion: string): {} | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
ParametersObject describing the parameters of the operation.
ResponseObject describing the response of the operation.
TraitsObject describing the traits of the operation.

ResourceOperations.ResourceCollectionAction​

Resource collection action operation template.

op Azure.Core.ResourceOperations.ResourceCollectionAction(apiVersion: string): {} | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
ParametersObject describing the parameters of the operation.
ResponseObject describing the response of the operation.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceAction​

Long-running resource action operation template.

op Azure.Core.ResourceOperations.LongRunningResourceAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
ParametersObject describing the parameters of the operation.
StatusResultObject describing the status result of the operation.
StatusErrorObject describing the status error of the operation.
TraitsObject describing the traits of the operation.

ResourceOperations.LongRunningResourceCollectionAction​

Long-running resource collection action operation template.

op Azure.Core.ResourceOperations.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
ParametersObject describing the parameters of the operation.
StatusResultObject describing the status result of the operation.
StatusErrorObject describing the status error of the operation.
TraitsObject describing the traits of the operation.

ResourceOperations.GetResourceOperationStatus​

Resource operation status operation template.

op Azure.Core.ResourceOperations.GetResourceOperationStatus(apiVersion: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | ErrorResponse
Template Parameters​
NameDescription
ResourceResource type.
StatusResultObject describing the status result of the operation.
StatusErrorObject describing the status error of the operation.
TraitsObject describing the traits of the operation.

GetResourceOperationStatus​

Operation signature to retrieve a resource operation status.

op Azure.Core.GetResourceOperationStatus(apiVersion: string): Azure.Core.ResourceOperationStatus<Resource, StatusResult, StatusError> | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
StatusResultObject describing the result of the status operation.
StatusErrorObject describing the error of the status operation. If not provided, the default error type is used.
TraitsTraits to apply to the operation.

LongRunningResourceAction​

DEPRECATED: Use LongRunningResourceAction from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature for a resource action.

op Azure.Core.LongRunningResourceAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters.
StatusResultObject describing the result of the status operation.
StatusErrorObject describing the error of the status operation. If not provided, the default error type is used.
TraitsTraits to apply to the operation.

LongRunningResourceCollectionAction​

DEPRECATED: Use LongRunningResourceCollectionAction from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature for an action that applies to a collection of resources.

op Azure.Core.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters.
StatusResultObject describing the result of the status operation.
StatusErrorObject describing the error of the status operation. If not provided, the default error type is used.
TraitsTraits to apply to the operation.

LongRunningResourceCreateOrReplace​

DEPRECATED: Use LongRunningResourceCreateOrReplace from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature to create or replace a resource.

op Azure.Core.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

LongRunningResourceCreateOrUpdate​

DEPRECATED: Use LongRunningResourceCreateOrUpdate from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature to create or update a resource.

op Azure.Core.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

LongRunningResourceCreateWithServiceProvidedName​

DEPRECATED: Use LongRunningResourceCreateWithServiceProvidedName from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature to create a resource with a service-provided name.

op Azure.Core.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 202, location: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

LongRunningResourceDelete​

DEPRECATED: Use LongRunningResourceDelete from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Long-running operation signature to delete a resource.

op Azure.Core.LongRunningResourceDelete(apiVersion: string): { statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: Azure.Core.Foundations.Error, result: never, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

LongRunningRpcOperation​

A long-running remote procedure call (RPC) operation.

op Azure.Core.LongRunningRpcOperation(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse

Template Parameters​

NameDescription
ParametersObject describing the parameters of the operation.
ResponseObject describing the response of the operation.
StatusResultObject describing the status result of the operation.
StatusErrorError response of the status operation. If not specified, the default error response is used.
TraitsObject describing the traits of the operation.
ErrorResponseError response of the operation. If not specified, the default error response is used.
TraitContextsTrait contexts applicable to the operation. Defaults to TraitContext.Undefined which means that only traits that always apply will appear. Can specify multiple using the | operator.

ResourceAction​

DEPRECATED: Use ResourceAction from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature for a resource action.

op Azure.Core.ResourceAction(apiVersion: string): {} | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters.
ResponseObject describing the response parameters.
TraitsTraits to apply to the operation.

ResourceCollectionAction​

DEPRECATED: Use ResourceCollectionAction from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature for an action that applies to a collection of resources.

op Azure.Core.ResourceCollectionAction(apiVersion: string): {} | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters.
ResponseObject describing the response parameters.
TraitsTraits to apply to the operation.

ResourceCreateOrReplace​

DEPRECATED: Use ResourceCreateOrReplace from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to create or replace a resource.

op Azure.Core.ResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201 } | { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceCreateOrUpdate​

DEPRECATED: Use ResourceCreateOrUpdate from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to create or update a resource.

op Azure.Core.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201 } | { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceCreateWithServiceProvidedName​

DEPRECATED: Use ResourceCreateWithServiceProvidedName from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to synchronously create a resource with a service-provided name.

op Azure.Core.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 201, location: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceDelete​

DEPRECATED: Use ResourceDelete from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to delete a resource.

op Azure.Core.ResourceDelete(apiVersion: string): Azure.Core.{ statusCode: 204 } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceList​

DEPRECATED: Use ResourceList from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to list resources in a paginated way.

op Azure.Core.ResourceList(apiVersion: string): Azure.Core.Foundations.CustomPage<Resource, Traits> | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceRead​

DEPRECATED: Use ResourceRead from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.

Operation signature to retrieve a resource.

op Azure.Core.ResourceRead(apiVersion: string): {} | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

ResourceUpdate​

DEPRECATED: Use ResourceUpdate from a ResourceOperations interface instance. This can be done by instantiating your own version with the traits you want alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;. See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use. Operation signature to update a resource.

op Azure.Core.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits to apply to the operation.

RpcOperation​

A remote procedure call (RPC) operation.

op Azure.Core.RpcOperation(apiVersion: string): {} | ErrorResponse

Template Parameters​

NameDescription
ParametersObject describing the parameters of the operation.
ResponseObject describing the response of the operation.
TraitsObject describing the traits of the operation.
ErrorResponseError response of the operation. If not specified, the default error response is used.
TraitContextsTrait contexts applicable to the operation. Defaults to TraitContext.Undefined which means that only traits that always apply will appear. Can specify multiple using the | operator.

Azure.Core.Foundations​

GetOperationStatus​

Operation that returns the status of another operation.

op Azure.Core.Foundations.GetOperationStatus(apiVersion: string, operationId: string): Azure.Core.Foundations.OperationStatus<StatusResult, StatusError> | ErrorResponse

Template Parameters​

NameDescription
ParametersObject describing the request parameters of the operation.
StatusResultThe type of the operation status result.
StatusErrorThe type of the operation status error.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

LongRunningOperation​

Long-running operation.

op Azure.Core.Foundations.LongRunningOperation(apiVersion: string): Azure.Core.Foundations.{ operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse

Template Parameters​

NameDescription
ParametersObject describing the request parameters of the operation.
ResponseObject describing the response properties of the operation. If not provided, the AcceptedResponse type will be used.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

LongRunningResourceUpdate​

Long-running operation that updates a resource.

op Azure.Core.Foundations.LongRunningResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

NonPagedResourceList​

Operation that lists resources in a non-paginated way.

op Azure.Core.Foundations.NonPagedResourceList(apiVersion: string): Azure.Core.Foundations.{ body: Array<Element> } | ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

Operation​

The most basic operation.

op Azure.Core.Foundations.Operation(apiVersion: string): Response | ErrorResponse

Template Parameters​

NameDescription
ParametersObject describing the request parameters of the operation.
ResponseObject describing the response properties of the operation.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

ResourceCollectionOperation​

Operation that applies to a collection of resources.

op Azure.Core.Foundations.ResourceCollectionOperation(apiVersion: string): Response | ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters of the operation.
ResponseObject describing the response properties of the operation.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

ResourceList​

Operation that lists resources in a paginated way.

op Azure.Core.Foundations.ResourceList(apiVersion: string): Response | ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters of the operation.
ResponseObject describing the response properties of the operation.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.

ResourceOperation​

The most basic operation that applies to a resource.

op Azure.Core.Foundations.ResourceOperation(apiVersion: string): Response | ErrorResponse

Template Parameters​

NameDescription
ResourceThe type of the resource.
ParametersObject describing the request parameters of the operation.
ResponseObject describing the response properties of the operation.
TraitsTraits which apply to the operation.
ErrorResponseThe type of the error response. If not provided, the default error response type will be used.