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

Decorators

Azure.Core​

@finalLocation​

Identifies a ModelProperty as containing the final location for the operation result.

@Azure.Core.finalLocation(finalResult?: Model | void)

Target​

ModelProperty

Parameters​

NameTypeDescription
finalResultModel | voidSets the expected return value for the final result. Overrides
any value provided in the decorated property, if the property uses ResourceLocation.

@finalOperation​

Identifies that an operation is the final operation for an LRO.

@Azure.Core.finalOperation(linkedOperation: Operation, parameters?: {})

Target​

Operation

Parameters​

NameTypeDescription
linkedOperationOperationThe linked Operation
parameters{}Map of RequestParameter<Name> and/or ResponseProperty<Name> that will
be passed to the linked operation request.

@fixed​

Marks an Enum as being fixed since enums in Azure are assumed to be extensible.

@Azure.Core.fixed

Target​

Enum

Parameters​

None

@items​

Identifies the ModelProperty that contains the paged items. Can only be used on a Model marked with @pagedResult.

@Azure.Core.items

Target​

ModelProperty

Parameters​

None

@lroCanceled​

Used for custom StatusMonitor implementation. Identifies an EnumMember as a long-running "Canceled" terminal state.

@Azure.Core.lroCanceled

Target​

EnumMember | UnionVariant

Parameters​

None

@lroErrorResult​

Used for custom StatusMonitor implementation. Identifies a model property of a StatusMonitor as containing the result of a long-running operation that terminates unsuccessfully (Failed).

@Azure.Core.lroErrorResult

Target​

ModelProperty

Parameters​

None

@lroFailed​

Used for custom StatusMonitor implementation. Identifies an enum member as a long-running "Failed" terminal state.

@Azure.Core.lroFailed

Target​

EnumMember | UnionVariant

Parameters​

None

@lroResult​

Used for custom StatusMonitor implementation. Identifies a model property of a StatusMonitor as containing the result of a long-running operation that terminates successfully (Succeeded).

@Azure.Core.lroResult

Target​

ModelProperty

Parameters​

None

@lroStatus​

Used for custom StatusMonitor implementation. Identifies an Enum or ModelProperty as containing long-running operation status.

@Azure.Core.lroStatus

Target​

Enum | Union | ModelProperty

Parameters​

None

@lroSucceeded​

Used for custom StatusMonitor implementation. Identifies an EnumMember as a long-running "Succeeded" terminal state.

@Azure.Core.lroSucceeded

Target​

EnumMember | UnionVariant

Parameters​

None

Identifies a ModelProperty that contains the next link value. Can only be used on a Model marked with @pagedResult.

@Azure.Core.nextLink

Target​

ModelProperty

Parameters​

None

@nextPageOperation​

Identifies that an operation is used to retrieve the next page for paged operations.

@Azure.Core.nextPageOperation(linkedOperation: Operation, parameters?: {})

Target​

Operation

Parameters​

NameTypeDescription
linkedOperationOperationThe linked Operation
parameters{}Map of RequestParameter<Name> and/or ResponseProperty<Name> that will
be passed to the linked operation request.

Identifies an operation that is linked to the target operation.

@Azure.Core.operationLink(linkedOperation: Operation, linkType: valueof string, parameters?: {})

Target​

Operation

Parameters​

NameTypeDescription
linkedOperationOperationThe linked Operation
linkTypevalueof stringA string indicating the role of the linked operation
parameters{}Map of RequestParameter<Name> and/or ResponseProperty<Name> that will
be passed to the linked operation request.

@pagedResult​

Marks a Model as a paged collection.

@Azure.Core.pagedResult

Target​

Model

Parameters​

None

@pollingLocation​

Identifies a model property as containing the location to poll for operation state.

@Azure.Core.pollingLocation(options?: Azure.Core.PollingOptions)

Target​

ModelProperty

Parameters​

NameTypeDescription
optionsPollingOptionsPollingOptions for the poller pointed to by this link. Overrides
settings derived from property value it is decorating, if the value of the
property is ResourceLocation

@pollingOperation​

Identifies that an operation is a polling operation for an LRO.

@Azure.Core.pollingOperation(linkedOperation: Operation, parameters?: {})

Target​

Operation

Parameters​

NameTypeDescription
linkedOperationOperationThe linked Operation
parameters{}Map of RequestParameter<Name> and/or ResponseProperty<Name> that will
be passed to the linked operation request.

@pollingOperationParameter​

Used to define how to call custom polling operations for long-running operations.

@Azure.Core.pollingOperationParameter(targetParameter?: ModelProperty | string)

Target​

ModelProperty

Parameters​

NameTypeDescription
targetParameterModelProperty | stringA reference to the polling operation parameter this parameter
provides a value for, or the name of that parameter. The default value is the name of
the decorated parameter or property.

@useFinalStateVia​

Overrides the final state value for an operation

@Azure.Core.useFinalStateVia(finalState: valueof "original-uri" | "operation-location" | "location" | "azure-async-operation")

Target​

Operation

Parameters​

NameTypeDescription
finalStatevalueof "original-uri" | "operation-location" | "location" | "azure-async-operation"The desired final state value

Azure.Core.Foundations​

@omitKeyProperties​

Deletes any key properties from the model.

@Azure.Core.Foundations.omitKeyProperties

Target​

Model

Parameters​

None

@requestParameter​

Identifies a property on a request model that serves as a linked operation parameter.

@Azure.Core.Foundations.requestParameter(name: valueof string)

Target​

Model

Parameters​

NameTypeDescription
namevalueof stringProperty name on the target

@responseProperty​

Identifies a property on all non-error response models that serve as a linked operation parameter.

@Azure.Core.Foundations.responseProperty(name: valueof string)

Target​

Model

Parameters​

NameTypeDescription
namevalueof stringProperty name on the target

Azure.Core.Traits​

@trait​

@trait marks a model type as representing a 'trait' and performs basic validation checks.

@Azure.Core.Traits.trait(traitName?: valueof string)

Target​

The model type to mark as a trait. unknown

Parameters​

NameTypeDescription
traitNamevalueof stringAn optional name to uniquely identify the trait. If unspecified,
the model type name is used.

@traitAdded​

Sets the version for when the trait was added to the specification. Can be applied to either a trait model type or its envelope property.

@Azure.Core.Traits.traitAdded(addedVersion: EnumMember | null)

Target​

Model | ModelProperty

Parameters​

NameTypeDescription
addedVersionEnumMember | nullThe enum member representing the service version.

@traitContext​

@traitContext sets the applicable context for a trait on its envelope property.

@Azure.Core.Traits.traitContext(contexts: EnumMember | Union | unknown)

Target​

The trait envelope property where the context will be applied. ModelProperty

Parameters​

NameTypeDescription
contextsEnumMember | Union | unknownAn enum member or union of enum members representing the trait's
applicable contexts.

@traitLocation​

@traitLocation sets the applicable location for a trait on its envelope property.

@Azure.Core.Traits.traitLocation(contexts: EnumMember)

Target​

The trait envelope property where the context will be applied. ModelProperty

Parameters​

NameTypeDescription
contextsEnumMemberAn enum member or union of enum members representing the trait's
applicable contexts.