diff --git a/specification/sphere/Sphere.Management/catalog.tsp b/specification/sphere/Sphere.Management/catalog.tsp index 4c3c92621d38..62fef25b3fb3 100644 --- a/specification/sphere/Sphere.Management/catalog.tsp +++ b/specification/sphere/Sphere.Management/catalog.tsp @@ -1,118 +1,137 @@ -import "@typespec/rest"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -//Catalogs @doc("An Azure Sphere catalog") model Catalog is TrackedResource { @doc("Name of catalog") @pattern("^[A-Za-z0-9_-]{1,50}$") @key("catalogName") - @path @segment("catalogs") name: string; } -@doc("Catalog properties") -model CatalogProperties { - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; -} - -@doc("Request of the action to list device groups for a catalog.") -model ListDeviceGroupsRequest { - @doc("Device Group name.") - deviceGroupName?: string; -} -@doc("Device insight report.") -model DeviceInsight { - @doc("Device ID") - deviceId: string; - - @doc("Event description") - description: string; - - @doc("Event start timestamp") - startTimestampUtc: utcDateTime; - - @doc("Event end timestamp") - endTimestampUtc: utcDateTime; - - @doc("Event category") - eventCategory: string; - - @doc("Event class") - eventClass: string; - - @doc("Event type") - eventType: string; - - @doc("Event count") - eventCount: int32; -} - @armResourceOperations -interface Catalogs - extends Azure.ResourceManager.TrackedResourceOperations< - Catalog, - CatalogProperties - > { - @autoRoute +interface Catalogs { + @doc("Get a Catalog") + get is ArmResourceRead; + @doc("Create a Catalog") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Catalog") + update is ArmCustomPatchSync; + @doc("Delete a Catalog") + delete is ArmResourceDeleteAsync; + @doc("List Catalog resources by resource group") + listByResourceGroup is ArmResourceListByParent; + @doc("List Catalog resources by subscription ID") + listBySubscription is ArmListBySubscription; @doc("Counts devices in catalog.") - @armResourceAction(Catalog) - @post - countDevices( - ...ResourceInstanceParameters, - ): ArmResponse | ErrorResponse; - - @autoRoute - @doc("Lists device insights for catalog.") - @armResourceAction(Catalog) - @post - listDeviceInsights( - ...ResourceInstanceParameters, - ...ListQueryParameters, - ): ArmResponse> | ErrorResponse; - - @autoRoute - @doc("Lists devices for catalog.") - @armResourceAction(Catalog) - @post - listDevices( - ...ResourceInstanceParameters, - ...ListQueryParameters, - ): ArmResponse> | ErrorResponse; - - @autoRoute + countDevices is ArmResourceActionSync; @doc("Lists deployments for catalog.") - @armResourceAction(Catalog) - @post - listDeployments( - ...ResourceInstanceParameters, - ...ListQueryParameters, - ): ArmResponse> | ErrorResponse; - - @autoRoute - @armResourceAction(Catalog) + listDeployments is ArmResourceActionSync< + Catalog, + void, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; @doc("List the device groups for the catalog.") - @post - listDeviceGroups( - ...ResourceInstanceParameters, - ...ListQueryParameters, - - @doc("List device groups for catalog.") - @body - listDeviceGroupsRequest: ListDeviceGroupsRequest, - ): ArmResponse> | ErrorResponse; + listDeviceGroups is ArmResourceActionSync< + Catalog, + ListDeviceGroupsRequest, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Lists device insights for catalog.") + listDeviceInsights is ArmResourceActionSync< + Catalog, + void, + PagedDeviceInsight, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Lists devices for catalog.") + listDevices is ArmResourceActionSync< + Catalog, + void, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; } diff --git a/specification/sphere/Sphere.Management/certificate.tsp b/specification/sphere/Sphere.Management/certificate.tsp index 0f8427e3b695..00bff2d7f579 100644 --- a/specification/sphere/Sphere.Management/certificate.tsp +++ b/specification/sphere/Sphere.Management/certificate.tsp @@ -1,95 +1,61 @@ -import "@typespec/rest"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -//Certificates @doc("An certificate resource belonging to a catalog resource.") @parentResource(Catalog) model Certificate is ProxyResource { @doc("Serial number of the certificate. Use '.default' to get current active certificate.") @key("serialNumber") - @path @segment("certificates") name: string; } @armResourceOperations -interface Certificates - extends ProxyResourceOperationsReadList { - @autoRoute +interface Certificates { + @doc("Get a Certificate") + get is ArmResourceRead; + @doc("List Certificate resources by Catalog") + listByCatalog is ArmResourceListByParent< + Certificate, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; @doc("Retrieves cert chain.") - @armResourceAction(Certificate) - @post - retrieveCertChain( - ...ResourceInstanceParameters, - ): ArmResponse | ErrorResponse; - - @autoRoute - @armResourceAction(Certificate) - @post + retrieveCertChain is ArmResourceActionSync< + Certificate, + void, + CertificateChainResponse + >; @doc("Gets the proof of possession nonce.") - retrieveProofOfPossessionNonce( - ...ResourceInstanceParameters, - - @doc("Proof of possession nonce request body ") - @body - proofOfPossessionNonceRequest: ProofOfPossessionNonceRequest, - ): ArmResponse | ErrorResponse; -} - -@doc("The properties of certificate") -model CertificateProperties { - @doc("The certificate as a UTF-8 encoded base 64 string.") - @visibility("read") - certificate?: string; - - @visibility("read") - @doc("The certificate status.") - status?: CertificateStatus; - - @visibility("read") - @doc("The certificate subject.") - subject?: string; - - @visibility("read") - @doc("The certificate thumbprint.") - thumbprint?: string; - - @visibility("read") - @doc("The certificate expiry date.") - expiryUtc?: utcDateTime; - - @visibility("read") - @doc("The certificate not before date.") - notBeforeUtc?: utcDateTime; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; + retrieveProofOfPossessionNonce is ArmResourceActionSync< + Certificate, + ProofOfPossessionNonceRequest, + ProofOfPossessionNonceResponse + >; } - -@doc("The certificate chain response.") -model CertificateChainResponse { - @doc("The certificate chain.") - @visibility("read") - certificateChain?: string; -} - -@doc("Request for the proof of possession nonce") -model ProofOfPossessionNonceRequest { - @doc("The proof of possession nonce") - proofOfPossessionNonce: string; -} - -@doc("Result of the action to generate a proof of possession nonce") -model ProofOfPossessionNonceResponse extends CertificateProperties {} diff --git a/specification/sphere/Sphere.Management/common.tsp b/specification/sphere/Sphere.Management/common.tsp deleted file mode 100644 index df93ccecdb16..000000000000 --- a/specification/sphere/Sphere.Management/common.tsp +++ /dev/null @@ -1,178 +0,0 @@ -import "@typespec/openapi"; -import "@typespec/rest"; -import "@typespec/versioning"; -import "@azure-tools/typespec-azure-core"; -import "@azure-tools/typespec-azure-resource-manager"; - -using TypeSpec.Http; -using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; -using Azure.ResourceManager; -using TypeSpec.OpenAPI; - -namespace Microsoft.AzureSphere; - -interface Operations extends Azure.ResourceManager.Operations {} - -// Common models -/** Provisioning state of the resource. */ -@lroStatus -enum ProvisioningState { - ...ResourceProvisioningState, - - /** The resource is being provisioned */ - Provisioning, - - /** The resource is being updated */ - Updating, - - /** The resource is being deleted */ - Deleting, - - /** The resource create request has been accepted */ - Accepted, -} - -@doc("Regional data boundary values.") -enum RegionalDataBoundary { - /** No data boundary */ - None, - - /** EU data boundary */ - EU, -} - -@doc("Allow crash dumps values.") -enum AllowCrashDumpCollection { - /** Crash dump collection enabled */ - Enabled, - - /** Crash dump collection disabled */ - Disabled, -} - -@doc("Certificate status values.") -enum CertificateStatus { - /** Certificate is active */ - Active, - - /** Certificate is inactive */ - Inactive, - - /** Certificate has expired */ - Expired, - - /** Certificate has been revoked */ - Revoked, -} - -@doc("Provides the custom '$filter' query parameter for list operations") -model CustomFilterQueryParameter { - @query("$filter") - @doc("Filter the result list using the given expression") - filter?: string; -} - -@doc("Provides the custom '$top' query parameter for list operations.") -model CustomTopQueryParameter { - @query("$top") - @doc("The number of result items to return.") - top?: int32; -} - -@doc("Provides the custom '$skip' query parameter for list operations.") -model CustomSkipQueryParameter { - @query("$skip") - @doc("The number of result items to skip.") - skip?: int32; -} - -@doc("Provides the custom '$maxpagesize' query parameter for list operations.") -model CustomMaxPageSizeQueryParameter { - @query("$maxpagesize") - @doc("The maximum number of result items per page.") - maxpagesize?: int32; -} - -// @doc("Provides the most common query parameters for list operations.") -alias StandardListQueryParametersWithCorrectNames = { - ...CustomTopQueryParameter; - ...CustomSkipQueryParameter; - ...CustomMaxPageSizeQueryParameter; -}; - -@doc("Response to the action call for count devices in a catalog.") -model CountDeviceResponse extends CountElementsResponse {} - -@doc("Response of the count for elements.") -model CountElementsResponse { - @doc("Number of children resources in parent resource.") - value: int32; -} - -alias ListQueryParameters = { - ...CustomFilterQueryParameter; - ...StandardListQueryParametersWithCorrectNames; -}; - -// Templates -interface ProxyResourceOperationsReadList< - TResource extends ArmResource, - TListParameters extends {} = {} -> - extends Azure.ResourceManager.ResourceRead, - ResourceListByParent< - TResource, - TListParameters & BaseParameters - > {} - -interface ProxyResourceOperationsReadListCreateDelete< - TResource extends ArmResource, - TListParameters extends {} = {} -> - extends Azure.ResourceManager.ResourceRead, - ResourceListByParent< - TResource, - TListParameters & BaseParameters - >, - ResourceCreate, - Azure.ResourceManager.ResourceDelete {} - -// Custom update operations -@armResourceOperations -interface CustomUpdateOperations { - @autoRoute - @doc("Update a {name}", TResource) - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - { - `final-state-via`: "location", - } - ) - @armResourceUpdate(TResource) - @patch - ArmCustomPatchAsyncWithLocation< - TResource extends ArmResource, - TPatchModel extends TagsUpdateModel, - TBaseParameters = BaseParameters - >( - ...ResourceInstanceParameters, - - @doc("The resource properties to be updated.") - @body - properties: TPatchModel, - ): ArmResponse | ArmAcceptedResponse<"Resource update request accepted."> | ErrorResponse; -} - -alias CustomArmResourcePatchAsync< - TResource extends ArmResource, - TProperties extends {}, - TBaseParameters = BaseParameters -> = CustomUpdateOperations.ArmCustomPatchAsyncWithLocation< - TResource, - ResourceUpdateModel, - TBaseParameters ->; diff --git a/specification/sphere/Sphere.Management/deployment.tsp b/specification/sphere/Sphere.Management/deployment.tsp index 72009dc2f077..b8d89c4eca0d 100644 --- a/specification/sphere/Sphere.Management/deployment.tsp +++ b/specification/sphere/Sphere.Management/deployment.tsp @@ -1,63 +1,53 @@ -import "@typespec/rest"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DeviceGroup.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -// Deployment @doc("An deployment resource belonging to a device group resource.") @parentResource(DeviceGroup) model Deployment is ProxyResource { @doc("Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.") @key("deploymentName") - @path @segment("deployments") name: string; } -interface ProxyResourceOperationsDeployments< - TResource extends ArmResource, - TListParameters extends {} = {} -> { +@armResourceOperations +interface Deployments { @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; - @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - list is ArmResourceListByParent< - TResource, - ListQueryParameters & BaseParameters - >; @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") createOrUpdate is ArmResourceCreateOrUpdateAsync; @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") delete is ArmResourceDeleteAsync; -} - -@armResourceOperations -interface Deployments extends ProxyResourceOperationsDeployments {} - -@doc("The properties of deployment") -model DeploymentProperties { - @visibility("create", "read") - @doc("Deployment ID") - deploymentId?: string; - - @doc("Images deployed") - @visibility("create", "read") - deployedImages?: Image[]; - - @doc("Deployment date UTC") - @visibility("read") - deploymentDateUtc?: utcDateTime; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; + @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + listByDeviceGroup is ArmResourceListByParent< + Deployment, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; } diff --git a/specification/sphere/Sphere.Management/device.tsp b/specification/sphere/Sphere.Management/device.tsp index 721646dde28e..4d3bfd5eb54d 100644 --- a/specification/sphere/Sphere.Management/device.tsp +++ b/specification/sphere/Sphere.Management/device.tsp @@ -1,127 +1,41 @@ -import "@typespec/rest"; -import "@typespec/openapi"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DeviceGroup.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; -using TypeSpec.OpenAPI; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -// Devices @doc("An device resource belonging to a device group resource.") @parentResource(DeviceGroup) model Device is ProxyResource { @doc("Device name") @pattern("^[a-zA-Z0-9-]{128}$") @key("deviceName") - @path @segment("devices") name: string; } -interface ProxyResourceOperationsDevice< - TResource extends ArmResource, - TListParameters extends {} = {} -> { +@armResourceOperations +interface Devices { @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") get is ArmResourceRead; @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") createOrUpdate is ArmResourceCreateOrUpdateAsync; - @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - list is ArmResourceListByParent< - TResource, - TListParameters & BaseParameters - >; - delete is ArmResourceDeleteAsync; @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") - update is CustomArmResourcePatchAsync; -} - -@armResourceOperations -interface Devices extends ProxyResourceOperationsDevice { - @autoRoute - @armResourceAction(Device) - @post + update is ArmCustomPatchAsync; + @doc("Delete a Device") + delete is ArmResourceDeleteAsync; + @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + listByDeviceGroup is ArmResourceListByParent; @doc("Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.") - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - { - `final-state-via`: "location", - } - ) - generateCapabilityImage( - ...ResourceInstanceParameters, - - @doc("Generate capability image request body.") - @body - generateDeviceCapabilityRequest: GenerateCapabilityImageRequest, - ): ArmResponse | ArmAcceptedResponse | ErrorResponse; -} - -@doc("The properties of device") -model DeviceProperties { - @doc("Device ID") - @visibility("create", "read") - deviceId?: string; - - @doc("SKU of the chip") - @visibility("read") - chipSku?: string; - - @doc("OS version available for installation when update requested") - @visibility("read") - lastAvailableOsVersion?: string; - - @doc("OS version running on device when update requested") - @visibility("read") - lastInstalledOsVersion?: string; - - @doc("Time when update requested and new OS version available") - @visibility("read") - lastOsUpdateUtc?: utcDateTime; - - @doc("Time when update was last requested") - @visibility("read") - lastUpdateRequestUtc?: utcDateTime; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; -} - -// Device models -@doc("Request of the action to create a signed device capability image") -model GenerateCapabilityImageRequest { - @doc("List of capabilities to create") - capabilities: CapabilityType[]; -} - -@doc("Signed device capability image response") -model SignedCapabilityImageResponse { - @doc("The signed device capability image as a UTF-8 encoded base 64 string.") - @visibility("read") - image?: string; -} - -@doc("Capability image type") -enum CapabilityType { - /** Application development capability */ - ApplicationDevelopment, - - /** Field servicing capability */ - FieldServicing, -} - -@doc("The properties of device patch") -model DevicePatchProperties { - @doc("Device group id") - deviceGroupId: string; + generateCapabilityImage is ArmResourceActionAsync< + Device, + GenerateCapabilityImageRequest, + SignedCapabilityImageResponse + >; } diff --git a/specification/sphere/Sphere.Management/deviceGroup.tsp b/specification/sphere/Sphere.Management/deviceGroup.tsp index 9baf49745b17..bfa8dbb0b996 100644 --- a/specification/sphere/Sphere.Management/deviceGroup.tsp +++ b/specification/sphere/Sphere.Management/deviceGroup.tsp @@ -1,131 +1,63 @@ -import "@typespec/rest"; -import "@typespec/openapi"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Product.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; -using TypeSpec.OpenAPI; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - @doc("An device group resource belonging to a product resource.") @parentResource(Product) model DeviceGroup is ProxyResource { @doc("Name of device group.") @pattern("^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$") @key("deviceGroupName") - @path @segment("deviceGroups") name: string; } -interface ProxyResourceOperationsDeviceGroups< - TResource extends ArmResource, - TListParameters extends {} = {} -> { - @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - list is ArmResourceListByParent< - TResource, - TListParameters & BaseParameters - >; +@armResourceOperations +interface DeviceGroups { @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + update is ArmCustomPatchAsync; @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") delete is ArmResourceDeleteAsync; - @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - update is ArmResourcePatchAsync; -} - -@armResourceOperations -interface DeviceGroups - extends ProxyResourceOperationsDeviceGroups< - DeviceGroup, - ListQueryParameters - > { - @autoRoute - @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - @armResourceAction(DeviceGroup) - @post - countDevices( - ...ResourceInstanceParameters, - ): ArmResponse | ErrorResponse; - - @autoRoute - @armResourceAction(DeviceGroup) - @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", + @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + listByProduct is ArmResourceListByParent< + DeviceGroup, { - `final-state-via`: "location", - } - ) - @post - claimDevices( - ...ResourceInstanceParameters, + ...BaseParameters; - @doc("Bulk claim devices request body.") - @body - claimDevicesRequest: ClaimDevicesRequest, - ): ArmAcceptedResponse | ErrorResponse; -} - -@doc("The properties of deviceGroup") -model DeviceGroupProperties { - @doc("Description of the device group.") - description?: string; - - @doc("Operating system feed type of the device group.") - osFeedType?: OSFeedType; - - @doc("Update policy of the device group.") - updatePolicy?: UpdatePolicy; - - @doc("Flag to define if the user allows for crash dump collection.") - allowCrashDumpsCollection?: AllowCrashDumpCollection; + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; - @doc("Regional data boundary for the device group.") - regionalDataBoundary?: RegionalDataBoundary; + @doc("The number of result items to return.") + @query("$top") + top?: int32; - @visibility("read") - @doc("Deployment status for the device group.") - hasDeployment?: boolean; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; -} - -@doc("OS feed type values.") -enum OSFeedType { - /** Retail OS feed type. */ - Retail, - - /** Retail evaluation OS feed type. */ - RetailEval, -} + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; -@doc("Update policy values.") -enum UpdatePolicy { - /** Update all policy. */ - UpdateAll, - - /** No update for 3rd party app policy. */ - No3rdPartyAppUpdates, -} - -// Device group models - -@doc("Request to the action call to bulk claim devices.") -model ClaimDevicesRequest { - @doc("Device identifiers of the devices to be claimed.") - deviceIdentifiers: string[]; + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") + claimDevices is ArmResourceActionNoResponseContentAsync< + DeviceGroup, + ClaimDevicesRequest + >; + @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + countDevices is ArmResourceActionSync; } diff --git a/specification/sphere/Sphere.Management/image.tsp b/specification/sphere/Sphere.Management/image.tsp index 5bb6bec02d80..dfa1ec8d7e7d 100644 --- a/specification/sphere/Sphere.Management/image.tsp +++ b/specification/sphere/Sphere.Management/image.tsp @@ -1,151 +1,53 @@ -import "@typespec/rest"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -//Images @doc("An image resource belonging to a catalog resource.") @parentResource(Catalog) model Image is ProxyResource { @doc("Image name. Use .default for image creation.") @key("imageName") - @path @segment("images") name: string; } @armResourceOperations -interface Images - extends ProxyResourceOperationsReadListCreateDelete< - Image, - ListQueryParameters - > {} - -@doc("The properties of image") -model ImageProperties { - @doc("Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.") - @visibility("create", "read") - image?: string; - - @doc("Image ID") - @visibility("create", "read") - imageId?: string; - - @doc("Image name") - @visibility("read") - imageName?: string; - - @doc("Regional data boundary for an image") - @visibility("create", "read") - regionalDataBoundary?: RegionalDataBoundary; - - @doc("Location the image") - @visibility("read") - uri?: string; - - @doc("The image description.") - @visibility("read") - description?: string; - - @doc("The image component id.") - @visibility("read") - componentId?: string; - - @doc("The image type.") - @visibility("read") - imageType?: ImageType; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; -} - -@doc("Image upload request body.") -model ImageUploadRequestBody { - @doc(".") - images: string; -} - -@doc("Image type values.") -enum ImageType { - /** Invalid image. */ - InvalidImageType, - - /** One Bl image type */ - OneBl, - - /** Pluton image type */ - PlutonRuntime, - - /** Wifi firmware image type */ - WifiFirmware, - - /** Security monitor image type */ - SecurityMonitor, - - /** Normal world loader image type */ - NormalWorldLoader, - - /** Normal world dtb image type */ - NormalWorldDtb, - - /** Normal world kernel image type */ - NormalWorldKernel, - - /** Root FS image type */ - RootFs, - - /** Services image type */ - Services, - - /** Applications image type */ - Applications, - - /** FW config image type */ - FwConfig, - - /** Boot manifest image type */ - BootManifest, - - /** Nwfs image type */ - Nwfs, - - /** Trusted key store image type */ - TrustedKeystore, - - /** Policy image type */ - Policy, - - /** Customer board config image type */ - CustomerBoardConfig, - - /** Update certificate store image type */ - UpdateCertStore, - - /** Base system update manifest image type */ - BaseSystemUpdateManifest, - - /** Firmware update manifest image type */ - FirmwareUpdateManifest, - - /** Customer update manifest image type */ - CustomerUpdateManifest, - - /** Recovery manifest image type */ - RecoveryManifest, - - /** manifest set image type */ - ManifestSet, - - /** Other image type */ - Other, +interface Images { + @doc("Get a Image") + get is ArmResourceRead; + @doc("Create a Image") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a Image") + delete is ArmResourceDeleteAsync; + @doc("List Image resources by Catalog") + listByCatalog is ArmResourceListByParent< + Image, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; } diff --git a/specification/sphere/Sphere.Management/main.tsp b/specification/sphere/Sphere.Management/main.tsp index 7bd635ad2bb0..56a062ee50dd 100644 --- a/specification/sphere/Sphere.Management/main.tsp +++ b/specification/sphere/Sphere.Management/main.tsp @@ -1,30 +1,34 @@ -import "./common.tsp"; -import "./catalog.tsp"; -import "./image.tsp"; -import "./deviceGroup.tsp"; -import "./certificate.tsp"; -import "./deployment.tsp"; -import "./device.tsp"; -import "./deviceGroup.tsp"; -import "./product.tsp"; import "@typespec/rest"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./Catalog.tsp"; +import "./Certificate.tsp"; +import "./Image.tsp"; +import "./Product.tsp"; +import "./DeviceGroup.tsp"; +import "./Deployment.tsp"; +import "./Device.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; +using TypeSpec.Http; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; - +using TypeSpec.Versioning; @armProviderNamespace @service({ - title: "AzureSphereProviderClient", - version: "2022-09-01-preview", + title: "AzureSphereManagementClient", }) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) @doc("Azure Sphere resource management API.") -@useDependency(Azure.Core.Versions.v1_0_Preview_1) -@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) namespace Microsoft.AzureSphere; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2022_09_01_preview: "2022-09-01-preview", +} diff --git a/specification/sphere/Sphere.Management/models.tsp b/specification/sphere/Sphere.Management/models.tsp new file mode 100644 index 000000000000..9821613f7e22 --- /dev/null +++ b/specification/sphere/Sphere.Management/models.tsp @@ -0,0 +1,434 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Microsoft.AzureSphere; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + @doc("Resource has been created.") Succeeded, + @doc("Resource creation failed.") Failed, + @doc("Resource creation was canceled.") Canceled, + @doc("The resource is being provisioned") Provisioning, + @doc("The resource is being updated") Updating, + @doc("The resource is being deleted") Deleting, + @doc("The resource create request has been accepted") Accepted, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum CertificateStatus { + @doc("Certificate is active") Active, + @doc("Certificate is inactive") Inactive, + @doc("Certificate has expired") Expired, + @doc("Certificate has been revoked") Revoked, +} + +enum RegionalDataBoundary { + @doc("No data boundary") None, + @doc("EU data boundary") EU, +} + +enum ImageType { + @doc("Invalid image.") InvalidImageType, + @doc("One Bl image type") OneBl, + @doc("Pluton image type") PlutonRuntime, + @doc("Wifi firmware image type") WifiFirmware, + @doc("Security monitor image type") SecurityMonitor, + @doc("Normal world loader image type") NormalWorldLoader, + @doc("Normal world dtb image type") NormalWorldDtb, + @doc("Normal world kernel image type") NormalWorldKernel, + @doc("Root FS image type") RootFs, + @doc("Services image type") Services, + @doc("Applications image type") Applications, + @doc("FW config image type") FwConfig, + @doc("Boot manifest image type") BootManifest, + @doc("Nwfs image type") Nwfs, + @doc("Trusted key store image type") TrustedKeystore, + @doc("Policy image type") Policy, + @doc("Customer board config image type") CustomerBoardConfig, + @doc("Update certificate store image type") UpdateCertStore, + @doc("Base system update manifest image type") BaseSystemUpdateManifest, + @doc("Firmware update manifest image type") FirmwareUpdateManifest, + @doc("Customer update manifest image type") CustomerUpdateManifest, + @doc("Recovery manifest image type") RecoveryManifest, + @doc("manifest set image type") ManifestSet, + @doc("Other image type") Other, +} + +enum OSFeedType { + @doc("Retail OS feed type.") Retail, + @doc("Retail evaluation OS feed type.") RetailEval, +} + +enum UpdatePolicy { + @doc("Update all policy.") UpdateAll, + @doc("No update for 3rd party app policy.") No3rdPartyAppUpdates, +} + +enum AllowCrashDumpCollection { + @doc("Crash dump collection enabled") Enabled, + @doc("Crash dump collection disabled") Disabled, +} + +enum CapabilityType { + @doc("Application development capability") ApplicationDevelopment, + @doc("Field servicing capability") FieldServicing, +} + +@doc("Catalog properties") +model CatalogProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Catalog.") +model CatalogUpdate { + @doc("Resource tags.") + tags?: Record; +} + +@doc("The properties of certificate") +model CertificateProperties { + @doc("The certificate as a UTF-8 encoded base 64 string.") + @visibility("read") + certificate?: string; + + @doc("The certificate status.") + @visibility("read") + status?: CertificateStatus; + + @doc("The certificate subject.") + @visibility("read") + subject?: string; + + @doc("The certificate thumbprint.") + @visibility("read") + thumbprint?: string; + + @doc("The certificate expiry date.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryUtc?: utcDateTime; + + @doc("The certificate not before date.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + notBeforeUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The certificate chain response.") +model CertificateChainResponse { + @doc("The certificate chain.") + @visibility("read") + certificateChain?: string; +} + +@doc("Request for the proof of possession nonce") +model ProofOfPossessionNonceRequest { + @doc("The proof of possession nonce") + proofOfPossessionNonce: string; +} + +@doc("Result of the action to generate a proof of possession nonce") +model ProofOfPossessionNonceResponse extends CertificateProperties {} + +@doc("Response to the action call for count devices in a catalog.") +model CountDeviceResponse extends CountElementsResponse {} + +@doc("Response of the count for elements.") +model CountElementsResponse { + @doc("Number of children resources in parent resource.") + value: int32; +} + +@doc("The properties of image") +model ImageProperties { + @doc("Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.") + @visibility("read", "create") + image?: string; + + @doc("Image ID") + @visibility("read", "create") + imageId?: string; + + @doc("Image name") + @visibility("read") + imageName?: string; + + @doc("Regional data boundary for an image") + @visibility("read", "create") + regionalDataBoundary?: RegionalDataBoundary; + + @doc("Location the image") + @visibility("read") + uri?: string; + + @doc("The image description.") + @visibility("read") + description?: string; + + @doc("The image component id.") + @visibility("read") + componentId?: string; + + @doc("The image type.") + @visibility("read") + imageType?: ImageType; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The properties of deployment") +model DeploymentProperties { + @doc("Deployment ID") + @visibility("read", "create") + deploymentId?: string; + + @doc("Images deployed") + @visibility("read", "create") + deployedImages?: Image[]; + + @doc("Deployment date UTC") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deploymentDateUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Request of the action to list device groups for a catalog.") +model ListDeviceGroupsRequest { + @doc("Device Group name.") + deviceGroupName?: string; +} + +@doc("The properties of deviceGroup") +model DeviceGroupProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; + + @doc("Deployment status for the device group.") + @visibility("read") + hasDeployment?: boolean; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Paged collection of DeviceInsight items") +model PagedDeviceInsight is Azure.Core.Page; + +@doc("Device insight report.") +model DeviceInsight { + @doc("Device ID") + deviceId: string; + + @doc("Event description") + description: string; + + @doc("Event start timestamp") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTimestampUtc: utcDateTime; + + @doc("Event end timestamp") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endTimestampUtc: utcDateTime; + + @doc("Event category") + eventCategory: string; + + @doc("Event class") + eventClass: string; + + @doc("Event type") + eventType: string; + + @doc("Event count") + eventCount: int32; +} + +@doc("The properties of device") +model DeviceProperties { + @doc("Device ID") + @visibility("read", "create") + deviceId?: string; + + @doc("SKU of the chip") + @visibility("read") + chipSku?: string; + + @doc("OS version available for installation when update requested") + @visibility("read") + lastAvailableOsVersion?: string; + + @doc("OS version running on device when update requested") + @visibility("read") + lastInstalledOsVersion?: string; + + @doc("Time when update requested and new OS version available") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastOsUpdateUtc?: utcDateTime; + + @doc("Time when update was last requested") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastUpdateRequestUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The properties of product") +model ProductProperties { + @doc("Description of the product") + description: string; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The type used for update operations of the Product.") +model ProductUpdate { + @doc("The updatable properties of the Product.") + properties?: ProductUpdateProperties; +} + +@doc("The updatable properties of the Product.") +model ProductUpdateProperties { + @doc("Description of the product") + description?: string; +} + +@doc("The type used for update operations of the DeviceGroup.") +model DeviceGroupUpdate { + @doc("The updatable properties of the DeviceGroup.") + properties?: DeviceGroupUpdateProperties; +} + +@doc("The updatable properties of the DeviceGroup.") +model DeviceGroupUpdateProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; +} + +@doc("Request to the action call to bulk claim devices.") +model ClaimDevicesRequest { + @doc("Device identifiers of the devices to be claimed.") + deviceIdentifiers: string[]; +} + +@doc("The type used for update operations of the Device.") +model DeviceUpdate { + @doc("The updatable properties of the Device.") + properties?: DeviceUpdateProperties; +} + +@doc("The updatable properties of the Device.") +model DeviceUpdateProperties { + @doc("Device group id") + deviceGroupId?: string; +} + +@doc("Request of the action to create a signed device capability image") +model GenerateCapabilityImageRequest { + @doc("List of capabilities to create") + capabilities: CapabilityType[]; +} + +@doc("Signed device capability image response") +model SignedCapabilityImageResponse { + @doc("The signed device capability image as a UTF-8 encoded base 64 string.") + @visibility("read") + image?: string; +} + +@doc("The properties of device patch") +model DevicePatchProperties { + @doc("Device group id") + deviceGroupId: string; +} + +@doc("Image upload request body.") +model ImageUploadRequestBody { + @doc(".") + images: string; +} diff --git a/specification/sphere/Sphere.Management/product.tsp b/specification/sphere/Sphere.Management/product.tsp index 09d6c83c9dad..e2f187e613e5 100644 --- a/specification/sphere/Sphere.Management/product.tsp +++ b/specification/sphere/Sphere.Management/product.tsp @@ -1,72 +1,43 @@ -import "@typespec/rest"; -import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; -using TypeSpec.Http; using TypeSpec.Rest; -using TypeSpec.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; namespace Microsoft.AzureSphere; - -//Products @doc("An product resource belonging to a catalog resource.") @parentResource(Catalog) model Product is ProxyResource { @doc("Name of product.") @pattern("^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$") @key("productName") - @path @segment("products") name: string; } -interface ProxyResourceOperationsProducts< - TResource extends ArmResource, - TListParameters extends {} = {} -> - extends ResourceListByParent< - TResource, - TListParameters & BaseParameters - > { +@armResourceOperations +interface Products { @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") get is ArmResourceRead; @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + update is ArmCustomPatchAsync; @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") delete is ArmResourceDeleteAsync; - @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - update is ArmResourcePatchAsync; -} - -@armResourceOperations -interface Products extends ProxyResourceOperationsProducts { - @autoRoute - @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - @armResourceAction(Product) - @post - generateDefaultDeviceGroups( - ...ResourceInstanceParameters, - ): ArmResponse> | ErrorResponse; - - @autoRoute + @doc("List Product resources by Catalog") + listByCatalog is ArmResourceListByParent; @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - @armResourceAction(Product) - @post - countDevices( - ...ResourceInstanceParameters, - ): ArmResponse | ErrorResponse; -} - -@doc("The properties of product") -model ProductProperties { - @doc("Description of the product") - description: string; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; + countDevices is ArmResourceActionSync; + @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + generateDefaultDeviceGroups is ArmResourceActionSync< + Product, + void, + ResourceListResult + >; } diff --git a/specification/sphere/Sphere.Management/tspconfig.yaml b/specification/sphere/Sphere.Management/tspconfig.yaml index cf32a0e5b91c..94026eee221f 100644 --- a/specification/sphere/Sphere.Management/tspconfig.yaml +++ b/specification/sphere/Sphere.Management/tspconfig.yaml @@ -1,23 +1,11 @@ emit: - - '@azure-tools/typespec-autorest' -linter: - extends: - - "@azure-tools/typespec-azure-resource-manager/all" - disable: - "@azure-tools/typespec-azure-core/composition-over-inheritance": "New rule" - "@azure-tools/typespec-azure-resource-manager/arm-common-types-version": "New rule" + - "@azure-tools/typespec-autorest" options: - '@azure-tools/typespec-autorest': + "@azure-tools/typespec-autorest": emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" examples-directory: "{project-root}/examples" - "@azure-tools/cadl-python": - "basic-setup-py": true - "package-version": 3.0.0b6 - "package-name": azure-sphere - "@azure-tools/cadl-csharp": - save-inputs: false - clear-output-folder: true - namespace: Azure.Sphere - model-namespace: false +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json b/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json index 077b2b100494..bfd38eebf426 100644 --- a/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json +++ b/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "AzureSphereProviderClient", + "title": "AzureSphereManagementClient", "version": "2022-09-01-preview", "description": "Azure Sphere resource management API.", "x-typespec-generated": [ @@ -45,23 +45,23 @@ { "name": "Catalogs" }, + { + "name": "Certificates" + }, { "name": "Images" }, { - "name": "DeviceGroups" + "name": "Products" }, { - "name": "Certificates" + "name": "DeviceGroups" }, { "name": "Deployments" }, { "name": "Devices" - }, - { - "name": "Products" } ], "paths": { @@ -91,11 +91,6 @@ } } }, - "x-ms-examples": { - "Operations_List": { - "$ref": "./examples/GetOperations.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -130,11 +125,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListBySubscription": { - "$ref": "./examples/GetCatalogsSub.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -172,11 +162,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListByResourceGroup": { - "$ref": "./examples/GetCatalogsRG.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -221,11 +206,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Catalogs_Get": { - "$ref": "./examples/GetCatalog.json" - } } }, "put": { @@ -289,11 +269,6 @@ } } }, - "x-ms-examples": { - "Catalogs_CreateOrUpdate": { - "$ref": "./examples/PutCatalog.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -346,11 +321,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Catalogs_Update": { - "$ref": "./examples/PatchCatalog.json" - } } }, "delete": { @@ -406,11 +376,6 @@ } } }, - "x-ms-examples": { - "Catalogs_Delete": { - "$ref": "./examples/DeleteCatalog.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -426,25 +391,48 @@ "description": "List Certificate resources by Catalog", "parameters": [ { - "$ref": "#/parameters/CustomFilterQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { "name": "catalogName", @@ -469,11 +457,6 @@ } } }, - "x-ms-examples": { - "Certificates_ListByCatalog": { - "$ref": "./examples/GetCertificates.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -525,11 +508,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Certificates_Get": { - "$ref": "./examples/GetCertificate.json" - } } } }, @@ -579,11 +557,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Certificates_RetrieveCertChain": { - "$ref": "./examples/PostRetrieveCatalogCertChain.json" - } } } }, @@ -620,9 +593,9 @@ "type": "string" }, { - "name": "proofOfPossessionNonceRequest", + "name": "body", "in": "body", - "description": "Proof of possession nonce request body ", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/ProofOfPossessionNonceRequest" @@ -642,11 +615,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Certificates_RetrieveProofOfPossessionNonce": { - "$ref": "./examples/PostRetrieveProofOfPossessionNonce.json" - } } } }, @@ -689,11 +657,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Catalogs_CountDevices": { - "$ref": "./examples/PostCountDevicesCatalog.json" - } } } }, @@ -706,25 +669,48 @@ "description": "List Image resources by Catalog", "parameters": [ { - "$ref": "#/parameters/CustomFilterQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { "name": "catalogName", @@ -749,11 +735,6 @@ } } }, - "x-ms-examples": { - "Images_ListByCatalog": { - "$ref": "./examples/GetImages.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -805,11 +786,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Images_Get": { - "$ref": "./examples/GetImage.json" - } } }, "put": { @@ -880,11 +856,6 @@ } } }, - "x-ms-examples": { - "Image_CreateOrUpdate": { - "$ref": "./examples/PutImage.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -950,11 +921,6 @@ } } }, - "x-ms-examples": { - "Images_Delete": { - "$ref": "./examples/DeleteImage.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -979,24 +945,47 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "catalogName", - "in": "path", - "description": "Name of catalog", - "required": true, + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, "type": "string", - "pattern": "^[A-Za-z0-9_-]{1,50}$" + "x-ms-client-name": "filter" }, { - "$ref": "#/parameters/CustomFilterQueryParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -1013,11 +1002,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListDeployments": { - "$ref": "./examples/PostListDeploymentsByCatalog.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1041,29 +1025,52 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "catalogName", - "in": "path", - "description": "Name of catalog", - "required": true, + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, "type": "string", - "pattern": "^[A-Za-z0-9_-]{1,50}$" + "x-ms-client-name": "filter" }, { - "$ref": "#/parameters/CustomFilterQueryParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { - "name": "listDeviceGroupsRequest", + "name": "body", "in": "body", - "description": "List device groups for catalog.", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/ListDeviceGroupsRequest" @@ -1084,11 +1091,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListDeviceGroups": { - "$ref": "./examples/PostListDeviceGroupsCatalog.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1112,24 +1114,47 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "catalogName", - "in": "path", - "description": "Name of catalog", - "required": true, + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, "type": "string", - "pattern": "^[A-Za-z0-9_-]{1,50}$" + "x-ms-client-name": "filter" }, { - "$ref": "#/parameters/CustomFilterQueryParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -1146,11 +1171,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListDeviceInsights": { - "$ref": "./examples/PostListDeviceInsightsCatalog.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1174,24 +1194,47 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "catalogName", - "in": "path", - "description": "Name of catalog", - "required": true, + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, "type": "string", - "pattern": "^[A-Za-z0-9_-]{1,50}$" + "x-ms-client-name": "filter" }, { - "$ref": "#/parameters/CustomFilterQueryParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -1208,11 +1251,6 @@ } } }, - "x-ms-examples": { - "Catalogs_ListDevices": { - "$ref": "./examples/PostListDevicesByCatalog.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1258,11 +1296,6 @@ } } }, - "x-ms-examples": { - "Products_ListByCatalog": { - "$ref": "./examples/GetProducts.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1315,11 +1348,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Products_Get": { - "$ref": "./examples/GetProduct.json" - } } }, "put": { @@ -1391,11 +1419,6 @@ } } }, - "x-ms-examples": { - "Products_CreateOrUpdate": { - "$ref": "./examples/PutProduct.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -1471,11 +1494,6 @@ } } }, - "x-ms-examples": { - "Products_Update": { - "$ref": "./examples/PatchProduct.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -1542,11 +1560,6 @@ } } }, - "x-ms-examples": { - "Products_Delete": { - "$ref": "./examples/DeleteProduct.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -1600,11 +1613,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Products_CountDevices": { - "$ref": "./examples/PostCountDevicesProduct.json" - } } } }, @@ -1617,25 +1625,48 @@ "description": "List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", "parameters": [ { - "$ref": "#/parameters/CustomFilterQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { "name": "catalogName", @@ -1668,11 +1699,6 @@ } } }, - "x-ms-examples": { - "DeviceGroups_ListByProduct": { - "$ref": "./examples/GetDeviceGroups.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -1733,11 +1759,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "DeviceGroups_Get": { - "$ref": "./examples/GetDeviceGroup.json" - } } }, "put": { @@ -1817,11 +1838,6 @@ } } }, - "x-ms-examples": { - "DeviceGroups_CreateOrUpdate": { - "$ref": "./examples/PutDeviceGroup.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -1905,11 +1921,6 @@ } } }, - "x-ms-examples": { - "DeviceGroups_Update": { - "$ref": "./examples/PatchDeviceGroup.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -1984,11 +1995,6 @@ } } }, - "x-ms-examples": { - "DeviceGroups_Delete": { - "$ref": "./examples/DeleteDeviceGroup.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -2037,9 +2043,9 @@ "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { - "name": "claimDevicesRequest", + "name": "body", "in": "body", - "description": "Bulk claim devices request body.", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/ClaimDevicesRequest" @@ -2054,6 +2060,10 @@ "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2064,11 +2074,6 @@ } } }, - "x-ms-examples": { - "DeviceGroups_ClaimDevices": { - "$ref": "./examples/PostClaimDevices.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -2130,11 +2135,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "DeviceGroups_CountDevices": { - "$ref": "./examples/PostCountDevicesDeviceGroup.json" - } } } }, @@ -2147,25 +2147,48 @@ "description": "List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", "parameters": [ { - "$ref": "#/parameters/CustomFilterQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/CustomTopQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/CustomSkipQueryParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/CustomMaxPageSizeQueryParameter" + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" }, { "name": "catalogName", @@ -2206,11 +2229,6 @@ } } }, - "x-ms-examples": { - "Deployments_ListByDeviceGroup": { - "$ref": "./examples/GetDeployments.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -2278,11 +2296,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Deployments_Get": { - "$ref": "./examples/GetDeployment.json" - } } }, "put": { @@ -2369,11 +2382,6 @@ } } }, - "x-ms-examples": { - "Deployments_CreateOrUpdate": { - "$ref": "./examples/PutDeployment.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -2455,11 +2463,6 @@ } } }, - "x-ms-examples": { - "Deployments_Delete": { - "$ref": "./examples/DeleteDeployment.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -2522,11 +2525,6 @@ } } }, - "x-ms-examples": { - "Devices_ListByDeviceGroup": { - "$ref": "./examples/GetDevices.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -2595,11 +2593,6 @@ "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } - }, - "x-ms-examples": { - "Devices_Get": { - "$ref": "./examples/GetDevice.json" - } } }, "put": { @@ -2687,11 +2680,6 @@ } } }, - "x-ms-examples": { - "Devices_CreateOrUpdate": { - "$ref": "./examples/PutDevice.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" }, @@ -2769,6 +2757,10 @@ "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2779,11 +2771,6 @@ } } }, - "x-ms-examples": { - "Devices_Update": { - "$ref": "./examples/PatchDevice.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -2866,11 +2853,6 @@ } } }, - "x-ms-examples": { - "Devices_Delete": { - "$ref": "./examples/DeleteDevice.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -2927,9 +2909,9 @@ "pattern": "^[a-zA-Z0-9-]{128}$" }, { - "name": "generateDeviceCapabilityRequest", + "name": "body", "in": "body", - "description": "Generate capability image request body.", + "description": "The content of the action request", "required": true, "schema": { "$ref": "#/definitions/GenerateCapabilityImageRequest" @@ -2950,6 +2932,10 @@ "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2960,11 +2946,6 @@ } } }, - "x-ms-examples": { - "Devices_GenerateCapabilityImage": { - "$ref": "./examples/PostGenerateDeviceCapabilityImage.json" - } - }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, @@ -3019,11 +3000,6 @@ } } }, - "x-ms-examples": { - "Products_GenerateDefaultDeviceGroups": { - "$ref": "./examples/PostGenerateDefaultDeviceGroups.json" - } - }, "x-ms-pageable": { "nextLinkName": "nextLink" } @@ -3031,9 +3007,18 @@ } }, "definitions": { + "ActionType": { + "type": "string", + "enum": [ + "Internal" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + }, "AllowCrashDumpCollection": { "type": "string", - "description": "Allow crash dumps values.", "enum": [ "Enabled", "Disabled" @@ -3057,7 +3042,6 @@ }, "CapabilityType": { "type": "string", - "description": "Capability image type", "enum": [ "ApplicationDevelopment", "FieldServicing" @@ -3091,8 +3075,17 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Name of catalog", + "pattern": "^[A-Za-z0-9_-]{1,50}$", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" @@ -3156,8 +3149,16 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Serial number of the certificate. Use '.default' to get current active certificate.", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -3241,7 +3242,6 @@ }, "CertificateStatus": { "type": "string", - "description": "Certificate status values.", "enum": [ "Active", "Inactive", @@ -3314,6 +3314,19 @@ "value" ] }, + "CreatedByType": { + "type": "string", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "CreatedByType", + "modelAsString": true + } + }, "Deployment": { "type": "object", "description": "An deployment resource belonging to a device group resource.", @@ -3326,8 +3339,16 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -3403,8 +3424,17 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Device name", + "pattern": "^[a-zA-Z0-9-]{128}$", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -3423,8 +3453,17 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Name of device group.", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -3494,7 +3533,7 @@ "properties": { "properties": { "$ref": "#/definitions/DeviceGroupUpdateProperties", - "x-ms-client-flatten": true + "description": "The updatable properties of the DeviceGroup." } } }, @@ -3661,7 +3700,7 @@ "properties": { "properties": { "$ref": "#/definitions/DeviceUpdateProperties", - "x-ms-client-flatten": true + "description": "The updatable properties of the Device." } } }, @@ -3703,8 +3742,16 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Image name. Use .default for image creation.", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -3794,7 +3841,6 @@ }, "ImageType": { "type": "string", - "description": "Image type values.", "enum": [ "InvalidImageType", "OneBl", @@ -3973,7 +4019,6 @@ }, "OSFeedType": { "type": "string", - "description": "OS feed type values.", "enum": [ "Retail", "RetailEval" @@ -3995,6 +4040,18 @@ ] } }, + "Origin": { + "type": "string", + "enum": [ + "user", + "system", + "user,system" + ], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, "PagedDeviceInsight": { "type": "object", "description": "Paged collection of DeviceInsight items", @@ -4029,8 +4086,17 @@ "read", "create" ] + }, + "name": { + "type": "string", + "description": "Name of product.", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", + "readOnly": true } }, + "required": [ + "name" + ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -4082,7 +4148,7 @@ "properties": { "properties": { "$ref": "#/definitions/ProductUpdateProperties", - "x-ms-client-flatten": true + "description": "The updatable properties of the Product." } } }, @@ -4120,7 +4186,6 @@ }, "ProvisioningState": { "type": "string", - "description": "Provisioning state of the resource.", "enum": [ "Succeeded", "Failed", @@ -4174,7 +4239,6 @@ }, "RegionalDataBoundary": { "type": "string", - "description": "Regional data boundary values.", "enum": [ "None", "EU" @@ -4196,6 +4260,32 @@ ] } }, + "Resource": { + "type": "object", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "readOnly": true + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/systemData", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "readOnly": true + } + } + }, "SignedCapabilityImageResponse": { "type": "object", "description": "Signed device capability image response", @@ -4209,7 +4299,6 @@ }, "UpdatePolicy": { "type": "string", - "description": "Update policy values.", "enum": [ "UpdateAll", "No3rdPartyAppUpdates" @@ -4230,47 +4319,24 @@ } ] } - } - }, - "parameters": { - "CustomFilterQueryParameter": { - "name": "$filter", - "in": "query", - "description": "Filter the result list using the given expression", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "filter" - }, - "CustomMaxPageSizeQueryParameter": { - "name": "$maxpagesize", - "in": "query", - "description": "The maximum number of result items per page.", - "required": false, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method", - "x-ms-client-name": "maxpagesize" }, - "CustomSkipQueryParameter": { - "name": "$skip", - "in": "query", - "description": "The number of result items to skip.", - "required": false, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method", - "x-ms-client-name": "skip" - }, - "CustomTopQueryParameter": { - "name": "$top", - "in": "query", - "description": "The number of result items to return.", - "required": false, - "type": "integer", - "format": "int32", - "x-ms-parameter-location": "method", - "x-ms-client-name": "top" + "Versions": { + "type": "string", + "description": "The available API versions.", + "enum": [ + "2022-09-01-preview" + ], + "x-ms-enum": { + "name": "Versions", + "modelAsString": true, + "values": [ + { + "name": "v2022_09_01_preview", + "value": "2022-09-01-preview" + } + ] + } } - } + }, + "parameters": {} } diff --git a/specification/sphere/resources.json b/specification/sphere/resources.json new file mode 100644 index 000000000000..a30a0e4a3843 --- /dev/null +++ b/specification/sphere/resources.json @@ -0,0 +1 @@ +{ "Resources":{ "Catalog":{ "Name":"Catalog","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}","Method":"GET","OperationID":"Catalogs_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Catalog"}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}","Method":"PUT","OperationID":"Catalogs_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Catalog"}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}","Method":"PATCH","OperationID":"Catalogs_Update","IsLongRunning":false,"PagingMetadata":null,"Description":"Update a Catalog"}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}","Method":"DELETE","OperationID":"Catalogs_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a Catalog"}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs","Method":"GET","OperationID":"Catalogs_ListByResourceGroup","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByResourceGroup","NextPageMethod":"ListByResourceGroupNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Catalog resources by resource group"}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[{ "Name":"GetCatalogs","Path":"/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs","Method":"GET","OperationID":"Catalogs_ListBySubscription","IsLongRunning":false,"PagingMetadata":{ "Method":"ListBySubscription","NextPageMethod":"ListBySubscriptionNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Catalog resources by subscription ID"}],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[{ "Name":"CountDevices","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices","Method":"POST","OperationID":"Catalogs_CountDevices","IsLongRunning":false,"PagingMetadata":null,"Description":"Counts devices in catalog."},{ "Name":"GetDeployments","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments","Method":"POST","OperationID":"Catalogs_ListDeployments","IsLongRunning":false,"PagingMetadata":{ "Method":"ListDeployments","NextPageMethod":"ListDeploymentsNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"Lists deployments for catalog."},{ "Name":"GetDeviceGroups","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups","Method":"POST","OperationID":"Catalogs_ListDeviceGroups","IsLongRunning":false,"PagingMetadata":{ "Method":"ListDeviceGroups","NextPageMethod":"ListDeviceGroupsNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List the device groups for the catalog."},{ "Name":"GetDeviceInsights","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights","Method":"POST","OperationID":"Catalogs_ListDeviceInsights","IsLongRunning":false,"PagingMetadata":{ "Method":"ListDeviceInsights","NextPageMethod":"ListDeviceInsightsNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"Lists device insights for catalog."},{ "Name":"GetDevices","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices","Method":"POST","OperationID":"Catalogs_ListDevices","IsLongRunning":false,"PagingMetadata":{ "Method":"ListDevices","NextPageMethod":"ListDevicesNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"Lists devices for catalog."}],"Parents":["ResourceGroupResource"],"SwaggerModelName":"Catalog","ResourceType":"Microsoft.AzureSphere/catalogs","ResourceKey":"catalogName","ResourceKeySegment":"catalogs","IsTrackedResource":true,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"Certificate":{ "Name":"Certificate","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}","Method":"GET","OperationID":"Certificates_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Certificate"}],"CreateOperations":[],"UpdateOperations":[],"DeleteOperations":[],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates","Method":"GET","OperationID":"Certificates_ListByCatalog","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByCatalog","NextPageMethod":"ListByCatalogNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Certificate resources by Catalog"}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[{ "Name":"RetrieveCertChain","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain","Method":"POST","OperationID":"Certificates_RetrieveCertChain","IsLongRunning":false,"PagingMetadata":null,"Description":"Retrieves cert chain."},{ "Name":"RetrieveProofOfPossessionNonce","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce","Method":"POST","OperationID":"Certificates_RetrieveProofOfPossessionNonce","IsLongRunning":false,"PagingMetadata":null,"Description":"Gets the proof of possession nonce."}],"Parents":["Catalog"],"SwaggerModelName":"Certificate","ResourceType":"Microsoft.AzureSphere/catalogs/certificates","ResourceKey":"serialNumber","ResourceKeySegment":"certificates","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"Image":{ "Name":"Image","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}","Method":"GET","OperationID":"Images_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Image"}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}","Method":"PUT","OperationID":"Images_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Image"}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}","Method":"PUT","OperationID":"Images_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Image"}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}","Method":"DELETE","OperationID":"Images_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a Image"}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images","Method":"GET","OperationID":"Images_ListByCatalog","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByCatalog","NextPageMethod":"ListByCatalogNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Image resources by Catalog"}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[],"Parents":["Catalog"],"SwaggerModelName":"Image","ResourceType":"Microsoft.AzureSphere/catalogs/images","ResourceKey":"imageName","ResourceKeySegment":"images","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"Product":{ "Name":"Product","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}","Method":"GET","OperationID":"Products_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}","Method":"PUT","OperationID":"Products_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}","Method":"PATCH","OperationID":"Products_Update","IsLongRunning":true,"PagingMetadata":null,"Description":"Update a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}","Method":"DELETE","OperationID":"Products_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name\u0027"}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products","Method":"GET","OperationID":"Products_ListByCatalog","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByCatalog","NextPageMethod":"ListByCatalogNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Product resources by Catalog"}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[{ "Name":"CountDevices","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices","Method":"POST","OperationID":"Products_CountDevices","IsLongRunning":false,"PagingMetadata":null,"Description":"Counts devices in product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."},{ "Name":"GenerateDefaultDeviceGroups","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups","Method":"POST","OperationID":"Products_GenerateDefaultDeviceGroups","IsLongRunning":false,"PagingMetadata":{ "Method":"GenerateDefaultDeviceGroups","NextPageMethod":"GenerateDefaultDeviceGroupsNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"Generates default device groups for the product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."}],"Parents":["Catalog"],"SwaggerModelName":"Product","ResourceType":"Microsoft.AzureSphere/catalogs/products","ResourceKey":"productName","ResourceKeySegment":"products","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"DeviceGroup":{ "Name":"DeviceGroup","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}","Method":"GET","OperationID":"DeviceGroups_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}","Method":"PUT","OperationID":"DeviceGroups_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}","Method":"PATCH","OperationID":"DeviceGroups_Update","IsLongRunning":true,"PagingMetadata":null,"Description":"Update a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}","Method":"DELETE","OperationID":"DeviceGroups_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups","Method":"GET","OperationID":"DeviceGroups_ListByProduct","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByProduct","NextPageMethod":"ListByProductNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List DeviceGroup resources by Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name."}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[{ "Name":"ClaimDevices","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices","Method":"POST","OperationID":"DeviceGroups_ClaimDevices","IsLongRunning":true,"PagingMetadata":null,"Description":"Bulk claims the devices. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names when bulk claiming devices to a catalog only."},{ "Name":"CountDevices","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices","Method":"POST","OperationID":"DeviceGroups_CountDevices","IsLongRunning":false,"PagingMetadata":null,"Description":"Counts devices in device group. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"Parents":["Product"],"SwaggerModelName":"DeviceGroup","ResourceType":"Microsoft.AzureSphere/catalogs/products/deviceGroups","ResourceKey":"deviceGroupName","ResourceKeySegment":"deviceGroups","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"Deployment":{ "Name":"Deployment","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}","Method":"GET","OperationID":"Deployments_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}","Method":"PUT","OperationID":"Deployments_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}","Method":"PUT","OperationID":"Deployments_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}","Method":"DELETE","OperationID":"Deployments_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments","Method":"GET","OperationID":"Deployments_ListByDeviceGroup","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByDeviceGroup","NextPageMethod":"ListByDeviceGroupNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Deployment resources by DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[],"Parents":["DeviceGroup"],"SwaggerModelName":"Deployment","ResourceType":"Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments","ResourceKey":"deploymentName","ResourceKeySegment":"deployments","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false},"Device":{ "Name":"Device","GetOperations":[{ "Name":"Get","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}","Method":"GET","OperationID":"Devices_Get","IsLongRunning":false,"PagingMetadata":null,"Description":"Get a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names when a device does not belong to a device group and product."}],"CreateOperations":[{ "Name":"CreateOrUpdate","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}","Method":"PUT","OperationID":"Devices_CreateOrUpdate","IsLongRunning":true,"PagingMetadata":null,"Description":"Create a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to claim a device to the catalog only."}],"UpdateOperations":[{ "Name":"Update","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}","Method":"PATCH","OperationID":"Devices_Update","IsLongRunning":true,"PagingMetadata":null,"Description":"Update a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to move a device to the catalog level."}],"DeleteOperations":[{ "Name":"Delete","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}","Method":"DELETE","OperationID":"Devices_Delete","IsLongRunning":true,"PagingMetadata":null,"Description":"Delete a Device"}],"ListOperations":[{ "Name":"GetAll","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices","Method":"GET","OperationID":"Devices_ListByDeviceGroup","IsLongRunning":false,"PagingMetadata":{ "Method":"ListByDeviceGroup","NextPageMethod":"ListByDeviceGroupNextPage","ItemName":"value","NextLinkName":"nextLink"},"Description":"List Device resources by DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name."}],"OperationsFromResourceGroupExtension":[],"OperationsFromSubscriptionExtension":[],"OperationsFromManagementGroupExtension":[],"OperationsFromTenantExtension":[],"OtherOperations":[{ "Name":"GenerateCapabilityImage","Path":"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage","Method":"POST","OperationID":"Devices_GenerateCapabilityImage","IsLongRunning":true,"PagingMetadata":null,"Description":"Generates the capability image for the device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to generate the image for a device that does not belong to a specific device group and product."}],"Parents":["DeviceGroup"],"SwaggerModelName":"Device","ResourceType":"Microsoft.AzureSphere/catalogs/products/deviceGroups/devices","ResourceKey":"deviceName","ResourceKeySegment":"devices","IsTrackedResource":false,"IsTenantResource":false,"IsSubscriptionResource":false,"IsManagementGroupResource":false,"IsExtensionResource":false,"IsSingletonResource":false} } } \ No newline at end of file