Skip to content

Commit

Permalink
hybridcompute - update readme.md for SDK commands generation (#28579)
Browse files Browse the repository at this point in the history
* update readme

* update npm

* remove log file

* fix logic

* fix readme
  • Loading branch information
yaotongms authored and tjprescott committed Apr 17, 2024
1 parent b670aef commit 89f9e69
Showing 1 changed file with 150 additions and 3 deletions.
153 changes: 150 additions & 3 deletions specification/hybridcompute/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,157 @@ These are the global settings for the HybridCompute API.
openapi-type: arm
tag: package-preview-2023-10
directive:
# add fix to swagger and remove them from here in the next swagger release
- from: HybridCompute.json
where: $.definitions.MachineInstallPatchesParameters.properties.maximumDuration
transform: $['format'] = 'duration'

- from: HybridCompute.json
where: $.definitions.MachineUpdateProperties.properties.privateLinkScopeResourceId
transform: $['format'] = 'arm-id'

- from: HybridCompute.json
where: $.definitions.MachineProperties.properties.privateLinkScopeResourceId
transform: $['format'] = 'arm-id'

- from: HybridCompute.json
where: $.definitions.AgentUpgrade.properties.correlationId
transform: $['format'] = 'uuid'

- from: HybridCompute.json
where: $.definitions.AgentUpgrade.properties.lastAttemptTimestamp
transform: $['format'] = 'date-time'

- from: HybridCompute.json
where: $.definitions.MachineProperties.properties.vmUuid
transform: $['format'] = 'uuid'

- from: HybridCompute.json
where: $.definitions.MachineProperties.properties.vmId
transform: $['format'] = 'uuid'

- from: HybridCompute.json
where: $.definitions.MachineUpdateProperties.properties.parentClusterResourceId
transform: $['format'] = 'arm-id'

- from: HybridCompute.json
where: $.definitions.MachineProperties.properties.parentClusterResourceId
transform: $['format'] = 'arm-id'

- from: HybridCompute.json
where: $.definitions.MachineAssessPatchesResult.properties.assessmentActivityId
transform: $['format'] = 'uuid'

# set expand property of list and show to be both strings
- from: HybridCompute.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"].get.parameters
transform: >-
return [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "machineName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9-_\\.]{1,54}$",
"minLength": 1,
"maxLength": 54,
"description": "The name of the hybrid machine."
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation.",
}
]
# add 200 response to run-command delete
- from: HybridCompute.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses
transform: >-
return {
"200": {
"description": "OK"
},
"202": {
"description": "Accepted",
"headers": {
"Location": {
"description": "The URL of the resource used to check the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.",
"type": "integer",
"format": "int32"
},
"Azure-AsyncOperation": {
"description": "The URI to poll for completion status.",
"type": "string"
}
}
},
"204": {
"description": "No Content"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}
# remove cmdlets
- where:
- $.definitions.Machine.properties
suppress:
- BodyTopLevelProperties
subject: NetworkProfile
remove: true
- where:
subject: MachineRunCommand
verb: Set
remove: true

# remove operations
- remove-operation: Machines_CreateOrUpdate
- remove-operation: MachineRunCommands_Update
- remove-operation: AgentVersion_List
- remove-operation: AgentVersion_Get
- remove-operation: HybridIdentityMetadata_Get
- remove-operation: HybridIdentityMetadata_ListByMachines

# add back when swagger change is checked in
- remove-operation: Licenses_Get
- remove-operation: Licenses_ValidateLicense
- remove-operation: Licenses_ListBySubscription
- remove-operation: Licenses_ListByResourceGroup
- remove-operation: Licenses_Delete
- remove-operation: Licenses_Update
- remove-operation: Licenses_CreateOrUpdate

- remove-operation: LicenseProfiles_Get
- remove-operation: LicenseProfiles_Delete
- remove-operation: LicenseProfiles_Update
- remove-operation: LicenseProfiles_List
- remove-operation: LicenseProfiles_CreateOrUpdate

- remove-operation: NetworkConfigurations_Get
- remove-operation: NetworkConfigurations_Update
- remove-operation: NetworkConfigurations_CreateOrUpdate

- remove-operation: NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope
- remove-operation: NetworkSecurityPerimeterConfigurations_ListByPrivateLinkScope
- remove-operation: NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope

```


Expand Down

0 comments on commit 89f9e69

Please sign in to comment.