Nobody Action
Sample configuration for nobody-action in operations.
Try itmain.tsp
import "@typespec/rest";import "@typespec/versioning";import "@azure-tools/typespec-azure-core";import "@azure-tools/typespec-azure-resource-manager";
using Http;using Rest;using Versioning;using Azure.Core;using Azure.ResourceManager;
/** Contoso Resource Provider management API. */@armProviderNamespace@service(#{ title: "ContosoProviderHubClient" })@versioned(Versions)namespace Microsoft.ContosoProviderHub;
/** Contoso API versions */enum Versions { /** 2021-10-01-preview version */ @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) `2021-10-01-preview`,}
/** A ContosoProviderHub resource */model Employee is TrackedResource<EmployeeProperties> { ...ResourceNameParameter<Employee>;}
/** Employee properties */model EmployeeProperties { /** Age of employee */ age?: int32;
/** City of employee */ city?: string;
/** Profile of employee */ @encode("base64url") profile?: bytes;
/** The status of the last operation. */ @visibility(Lifecycle.Read) provisioningState?: ProvisioningState;}
/** The provisioning state of a resource. */@lroStatusunion ProvisioningState { ResourceProvisioningState,
/** The resource is being provisioned */ Provisioning: "Provisioning",
/** The resource is updating */ Updating: "Updating",
/** The resource is being deleted */ Deleting: "Deleting",
/** The resource create request has been accepted */ Accepted: "Accepted",
string,}
interface Operations extends Azure.ResourceManager.Operations {}
@armResourceOperationsinterface Employees { get is ArmResourceRead<Employee>; createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>; update is ArmCustomPatchSync< Employee, Azure.ResourceManager.Foundations.ResourceUpdateModel<Employee, EmployeeProperties> >; delete is ArmResourceDeleteSync<Employee>; listByResourceGroup is ArmResourceListByParent<Employee>; listBySubscription is ArmListBySubscription<Employee>;
/** Sample sync action with no request body */ actionSync is ArmResourceActionSync<Employee, void, void>;
/** Sample async action with no request body */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "https://github.com/Azure/typespec-azure/issues/857" actionAsync is ArmResourceActionAsync<Employee, void, void>;
/** Sample sync action with no request body and response */ actionNoReqResSync is ArmResourceActionNoContentSync<Employee, void>;
/** Sample async action with no request body and response */ actionNoReqResAsync is ArmResourceActionNoResponseContentAsync<Employee, void>;
/** A sample HEAD operation to check resource existence */ checkExistence is ArmResourceCheckExistence<Employee>;}