Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c509e7a
The first version of TSP
melina5656 Apr 29, 2025
624afa7
some fix
melina5656 May 6, 2025
50b1e62
Merge branch 'main' into convert/maintenance
melina5656 May 6, 2025
a415cfd
some fix
melina5656 May 7, 2025
58b591f
update
May 8, 2025
95f4bda
Some fixes
melina5656 May 9, 2025
3e07617
Delete oldSwagger.json
melina5656 May 9, 2025
a19e801
Update tspconfig.yaml
melina5656 May 9, 2025
5393039
Merge branch 'main' into convert/maintenance
melina5656 May 12, 2025
387d362
run prettier
melina5656 May 12, 2025
474df3b
run prettier and compile
melina5656 May 12, 2025
6739920
Merge branch 'main' into convert/maintenance
melina5656 May 12, 2025
cda524f
update
melina5656 May 12, 2025
c65de81
Merge branch 'main' into convert/maintenance
tadelesh May 14, 2025
d328132
Rename LegacyOperations to CustomLegacyOperations
melina5656 May 20, 2025
131b922
spell update
mcgallan May 23, 2025
305c4ae
Merge branch 'main' into convert/maintenance
mcgallan May 23, 2025
b53121f
Merge branch 'main' into convert/maintenance
mcgallan May 30, 2025
5baabb4
Delete conditionalClientFlatten
melina5656 Jun 6, 2025
e4ce23b
update
mcgallan Jun 9, 2025
b614731
update justification
melina5656 Jun 10, 2025
2c96355
Merge remote-tracking branch 'upstream/main' into convert/maintenance
mcgallan Jun 19, 2025
041240e
update
mcgallan Jun 19, 2025
72145c0
optimization for legacy operation
welovej Jun 19, 2025
2549d02
update
mcgallan Jun 20, 2025
da3d2dc
Merge remote-tracking branch 'upstream/main' into convert/maintenance
mcgallan Jun 30, 2025
45b2000
update
mcgallan Jul 1, 2025
1060d47
update
Jul 3, 2025
6342574
update
Jul 7, 2025
8b81639
Merge branch 'main' into convert/maintenance
v-jiaodi Jul 8, 2025
eabd936
Merge branch 'main' into convert/maintenance
v-jiaodi Jul 8, 2025
82c773f
resolve breaking change Deleted Class MaintenanceManagementClient
v-jiaodi Jul 8, 2025
2ac553f
Merge branch 'main' into convert/maintenance
v-jiaodi Jul 11, 2025
6e709ce
Update tspconfig.yaml
tadelesh Jul 11, 2025
80cb1e1
update
Jul 11, 2025
50a9a4e
Merge branch 'convert/maintenance' of https://github.com/Azure/azure-…
Jul 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions specification/maintenance/Maintenance.Management/ApplyUpdate.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.Maintenance;
/**
* Apply Update request
*/
model ApplyUpdate
is Azure.ResourceManager.ProxyResource<ApplyUpdateProperties> {
...ResourceNameParameter<
Resource = ApplyUpdate,
KeyName = "applyUpdateName",
SegmentName = "applyUpdates",
NamePattern = ""
>;
}

@armResourceOperations
interface ApplyUpdateOps
extends Azure.ResourceManager.Legacy.ExtensionOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,

/**
* Resource provider name
*/
@path
@key
@segment("providers")
providerName: string,

/**
* Resource parent type
*/
@path @key resourceParentType: string,

/**
* Resource parent name
*/
@path @key resourceParentName: string,

/**
* Resource type
*/
@path @key resourceType: string,

/**
* Resource name
*/
@path @key resourceName: string,
},
{},
{
...Extension.ExtensionProviderNamespace<ApplyUpdate>,
...KeysOf<ResourceNameParameter<
Resource = ApplyUpdate,
KeyName = "applyUpdateName",
SegmentName = "applyUpdates",
NamePattern = ""
>>,
}
> {}

@armResourceOperations
interface ApplyUpdates {
/**
* Track maintenance updates to resource with parent
*/
getParent is ApplyUpdateOps.Read<ApplyUpdate, ErrorType = MaintenanceError>;
}

@armResourceOperations
interface ApplyUpdateOperationGroupOps
extends Azure.ResourceManager.Legacy.ExtensionOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,

/**
* Resource provider name
*/
@path
@key
@segment("providers")
providerName: string,

/**
* Resource parent type
*/
@path @key resourceType: string,

/**
* Resource parent name
*/
@path @key resourceName: string,
},
{},
{
...Extension.ExtensionProviderNamespace<ApplyUpdate>,
...KeysOf<ResourceNameParameter<
Resource = ApplyUpdate,
KeyName = "applyUpdateName",
SegmentName = "applyUpdates",
NamePattern = ""
>>,
}
> {}

#suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@armResourceOperations
interface ApplyUpdateOperationGroup {
Comment thread
pshao25 marked this conversation as resolved.
/**
* Track maintenance updates to resource
*/
get is ApplyUpdateOperationGroupOps.Read<
ApplyUpdate,
ErrorType = MaintenanceError
>;

/**
* Apply maintenance updates to resource
*/
createOrUpdateOrCancel is ApplyUpdateOperationGroupOps.CreateOrUpdateSync<
ApplyUpdate,
ErrorType = MaintenanceError
>;

/**
* Get Configuration records within a subscription
*/
list is Extension.ListByTarget<
Extension.Subscription,
ApplyUpdate,
Response = ArmResponse<ListApplyUpdate>,
Error = MaintenanceError
>;
}

@@doc(ApplyUpdate.name, "applyUpdate Id");
@@doc(ApplyUpdate.properties, "Properties of the apply update");
@@doc(ApplyUpdateOperationGroup.createOrUpdateOrCancel::parameters.resource,
"The ApplyUpdate"
);
Loading
Loading