Skip to content

Commit

Permalink
Re-Enable PATCH optionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoodyear committed Mar 7, 2025
1 parent 2ad3ee7 commit a51cc9d
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 182 deletions.
12 changes: 0 additions & 12 deletions specification/mission/Mission.Management/model.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ interface Workload {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
WorkloadResource,
PatchModel = WorkloadPatchResource
Expand All @@ -220,7 +219,6 @@ interface Endpoint {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
EndpointResource,
PatchModel = EndpointPatchResource
Expand All @@ -242,7 +240,6 @@ interface VirtualEnclave {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
EnclaveResource,
PatchModel = VirtualEnclavePatchResource
Expand Down Expand Up @@ -295,7 +292,6 @@ interface Community {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
CommunityResource,
PatchModel = CommunityPatchResource
Expand Down Expand Up @@ -333,7 +329,6 @@ interface CatalogInterface {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
CatalogResource,
PatchModel = CatalogPatchResource
Expand All @@ -355,7 +350,6 @@ interface InternalConnections {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
InternalConnection,
PatchModel = InternalConnectionPatchResource
Expand All @@ -378,7 +372,6 @@ interface TransitHub {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
TransitHubResource,
PatchModel = TransitHubPatchResource
Expand All @@ -401,7 +394,6 @@ interface EnclaveConnection {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
EnclaveConnectionResource,
PatchModel = EnclaveConnectionPatchResource
Expand Down Expand Up @@ -441,7 +433,6 @@ interface EnclaveEndpoints {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
EnclaveEndpointResource,
PatchModel = EnclaveEndpointPatchResource
Expand Down Expand Up @@ -481,7 +472,6 @@ interface CommunityEndpoints {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
CommunityEndpointResource,
PatchModel = CommunityEndpointPatchResource
Expand Down Expand Up @@ -520,7 +510,6 @@ interface ExternalConnections {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader &
ArmAsyncOperationHeader
>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
ExternalConnection,
PatchModel = ExternalConnectionPatchResource
Expand All @@ -544,7 +533,6 @@ interface Approval {
ArmAsyncOperationHeader
>;
listByParent is ArmResourceListByParent<ApprovalResource>;
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
ApprovalResource,
PatchModel = ApprovalPatchResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4454,6 +4454,29 @@
"type": "string",
"description": "Represents an Azure geography region where supported resource providers live."
},
"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate": {
"type": "object",
"description": "Managed service identity (system assigned and/or user assigned identities)",
"properties": {
"type": {
"$ref": "../../../../../common-types/resource-management/v6/managedidentity.json#/definitions/ManagedServiceIdentityType",
"description": "The type of managed identity assigned to this resource."
},
"userAssignedIdentities": {
"type": "object",
"description": "The identities assigned to this resource by the user.",
"additionalProperties": {
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v6/managedidentity.json#/definitions/UserAssignedIdentity"
}
],
"type": "object",
"x-nullable": true
}
}
}
},
"CheckAddressSpaceAvailabilityRequest": {
"type": "object",
"description": "Request to the action call to check address space availability.",
Expand Down Expand Up @@ -4681,7 +4704,7 @@
}
},
"identity": {
"$ref": "../../../../../common-types/resource-management/v6/managedidentity.json#/definitions/ManagedServiceIdentity",
"$ref": "#/definitions/Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate",
"description": "The managed service identities assigned to this resource."
}
}
Expand Down Expand Up @@ -5929,6 +5952,43 @@
"mode"
]
},
"MaintenanceModeConfigurationUpdate": {
"type": "object",
"description": "Maintenance Mode",
"properties": {
"mode": {
"type": "string",
"description": "Current mode of Maintenance Mode Configuration",
"enum": [
"On",
"CanNotDelete",
"Off"
],
"x-ms-enum": {
"modelAsString": true
}
},
"principals": {
"type": "array",
"description": "The user, group or service principal object affected by Maintenance Mode",
"items": {
"$ref": "#/definitions/Principal"
}
},
"justification": {
"type": "string",
"description": "Justification for entering or exiting Maintenance Mode",
"enum": [
"Networking",
"Governance",
"Off"
],
"x-ms-enum": {
"modelAsString": true
}
}
}
},
"ManagedResourceGroupConfiguration": {
"type": "object",
"description": "ManagedResourceGroup related properties",
Expand Down Expand Up @@ -6075,6 +6135,20 @@
"resourceAction"
]
},
"RequestMetadataUpdate": {
"type": "object",
"description": "Request Metadata for approvals request.",
"properties": {
"resourceAction": {
"type": "string",
"description": "Resource Action of the item being approved or declined."
},
"approvalStatus": {
"$ref": "#/definitions/ApprovalStatus",
"description": "Approval status."
}
}
},
"ServiceIdentifier": {
"type": "string",
"description": "Identifier for governed services.",
Expand Down Expand Up @@ -6426,11 +6500,6 @@
"type": "object",
"description": "A copy of the input model `T` with only the properties that are visible during the\n\"Update\" resource lifecycle phase.\n\nThe \"Update\" lifecycle phase is used for properties passed as parameters to operations\nthat update data, like HTTP PATCH operations.\n\nThis transformation will include only the properties that have the `Lifecycle.Update`\nvisibility modifier, and the types of all properties will be replaced with the\nequivalent `CreateOrUpdate` transformation.\n\nIf a `NameTemplate` is provided, the new model will be named according to the template.\nThe template uses the same syntax as the `@friendlyName` decorator.",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "Provisioning State.",
"readOnly": true
},
"parent1": {
"type": "string",
"description": "Parameter for optimizing query results"
Expand All @@ -6440,13 +6509,10 @@
"description": "Parameter for optimizing query results"
},
"requestMetadata": {
"$ref": "#/definitions/RequestMetadata",
"$ref": "#/definitions/RequestMetadataUpdate",
"description": "Request metadata for the approval request."
}
},
"required": [
"requestMetadata"
]
}
},
"UpdateCommunityEndpointPatchProperties": {
"type": "object",
Expand All @@ -6467,19 +6533,11 @@
"type": "string"
}
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "Provisioning State.",
"readOnly": true
},
"approvalRequired": {
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
},
"required": [
"ruleCollection"
]
}
},
"UpdateCommunityPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6549,24 +6607,14 @@
"$ref": "#/definitions/DestinationEndpointResourceId",
"description": "Destination Endpoint Resource Id."
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "Provisioning State.",
"readOnly": true
},
"resourceCollection": {
"type": "array",
"description": "List of resource ids modified by enclave Connections.",
"items": {
"type": "string"
}
}
},
"required": [
"communityResourceId",
"sourceResourceId",
"destinationEndpointId"
]
}
},
"UpdateEnclaveEndpointPatchProperties": {
"type": "object",
Expand All @@ -6587,19 +6635,11 @@
"type": "string"
}
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "Provisioning State.",
"readOnly": true
},
"approvalRequired": {
"type": "boolean",
"description": "Whether approval is needed for the connection (True or False)."
}
},
"required": [
"ruleCollection"
]
}
},
"UpdateEndpointPatchProperties": {
"type": "object",
Expand All @@ -6626,11 +6666,6 @@
"type": "object",
"description": "A copy of the input model `T` with only the properties that are visible during the\n\"Update\" resource lifecycle phase.\n\nThe \"Update\" lifecycle phase is used for properties passed as parameters to operations\nthat update data, like HTTP PATCH operations.\n\nThis transformation will include only the properties that have the `Lifecycle.Update`\nvisibility modifier, and the types of all properties will be replaced with the\nequivalent `CreateOrUpdate` transformation.\n\nIf a `NameTemplate` is provided, the new model will be named according to the template.\nThe template uses the same syntax as the `@friendlyName` decorator.",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "The status of the last operation.",
"readOnly": true
},
"state": {
"$ref": "#/definitions/ExternalConnectionState",
"description": "The state of the externalConnection."
Expand Down Expand Up @@ -6660,22 +6695,12 @@
"type": "string"
}
}
},
"required": [
"communityResourceId",
"enclaveIds",
"externalCidrs"
]
}
},
"UpdateInternalConnectionProperties": {
"type": "object",
"description": "A copy of the input model `T` with only the properties that are visible during the\n\"Update\" resource lifecycle phase.\n\nThe \"Update\" lifecycle phase is used for properties passed as parameters to operations\nthat update data, like HTTP PATCH operations.\n\nThis transformation will include only the properties that have the `Lifecycle.Update`\nvisibility modifier, and the types of all properties will be replaced with the\nequivalent `CreateOrUpdate` transformation.\n\nIf a `NameTemplate` is provided, the new model will be named according to the template.\nThe template uses the same syntax as the `@friendlyName` decorator.",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "The status of the last operation.",
"readOnly": true
},
"connectionType": {
"$ref": "#/definitions/InternalConnectionType",
"description": "Specifies the type of internal connection. \n Possible values are:\n PrivateLink \n NetworkSecurityGroup"
Expand Down Expand Up @@ -6714,15 +6739,7 @@
"type": "string"
}
}
},
"required": [
"connectionType",
"communityResourceId",
"destinationEnclaveId",
"destinationEndpointId",
"sourceEnclaveId",
"sourceCidrs"
]
}
},
"UpdateTransitHubPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6754,20 +6771,10 @@
"type": "object",
"description": "A copy of the input model `T` with only the properties that are visible during the\n\"Update\" resource lifecycle phase.\n\nThe \"Update\" lifecycle phase is used for properties passed as parameters to operations\nthat update data, like HTTP PATCH operations.\n\nThis transformation will include only the properties that have the `Lifecycle.Update`\nvisibility modifier, and the types of all properties will be replaced with the\nequivalent `CreateOrUpdate` transformation.\n\nIf a `NameTemplate` is provided, the new model will be named according to the template.\nThe template uses the same syntax as the `@friendlyName` decorator.",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "Provisioning State.",
"readOnly": true
},
"enclaveVirtualNetwork": {
"$ref": "#/definitions/EnclaveVirtualNetwork",
"description": "Virtual Network."
},
"enclaveAddressSpaces": {
"$ref": "#/definitions/EnclaveAddressSpaces",
"description": "Enclave Address Spaces",
"readOnly": true
},
"communityResourceId": {
"$ref": "#/definitions/CommunityResourceId",
"description": "Community Resource Id."
Expand All @@ -6788,18 +6795,14 @@
"description": "Managed resource group configuration."
},
"maintenanceModeConfiguration": {
"$ref": "#/definitions/MaintenanceModeConfiguration",
"$ref": "#/definitions/MaintenanceModeConfigurationUpdate",
"description": "Maintenance Mode configuration."
},
"bastionEnabled": {
"type": "boolean",
"description": "Deploy Bastion service (True or False)."
}
},
"required": [
"enclaveVirtualNetwork",
"communityResourceId"
]
}
},
"UpdateWorkloadPatchProperties": {
"type": "object",
Expand Down Expand Up @@ -6828,7 +6831,7 @@
"description": "Virtual Enclave Patch properties"
},
"identity": {
"$ref": "../../../../../common-types/resource-management/v6/managedidentity.json#/definitions/ManagedServiceIdentity",
"$ref": "#/definitions/Azure.ResourceManager.CommonTypes.ManagedServiceIdentityUpdate",
"description": "The managed service identities assigned to this resource."
},
"tags": {
Expand Down
Loading

0 comments on commit a51cc9d

Please sign in to comment.