Skip to content

Commit

Permalink
Microsoft.Monitor common extendedLocation (#30082)
Browse files Browse the repository at this point in the history
  • Loading branch information
andborja authored Aug 7, 2024
1 parent 42de216 commit cf40604
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ interface AzureMonitorWorkspaces {
LroHeaders = Azure.Core.Foundations.RetryAfterHeader
>;
@doc("Updates part of a workspace")
@parameterVisibility
update is ArmCustomPatchSync<
AzureMonitorWorkspace,
Azure.ResourceManager.Foundations.ResourceUpdateModel<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ model PipelineGroup is TrackedResource<PipelineGroupProperties> {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "Extended location is not included in TrackedResource yet."
@doc("The extended location for given pipeline group.")
@visibility("read", "create")
extendedLocation?: ExtendedLocation;
extendedLocation?: CommonTypes.ExtendedLocation;
}

@doc("Properties that need to be specified to create a new pipeline group instance.")
Expand Down Expand Up @@ -257,6 +257,7 @@ interface PipelineGroups {
delete is ArmResourceDeleteWithoutOkAsync<PipelineGroup>;

@doc("Updates a pipeline group instance")
@parameterVisibility
update is ArmCustomPatchAsync<
PipelineGroup,
Azure.ResourceManager.Foundations.ResourceUpdateModel<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,4 @@ union ProvisioningState {
Deleting: "Deleting",
}

@doc("The extended location info.")
model ExtendedLocation {
@doc("The type of extended location.")
type: ExtendedLocationType;

@doc("The name of extended location.")
name: string;
}

@doc("The extended location type.")
union ExtendedLocationType {
string,

@doc("Custom location.")
CustomLocation: "CustomLocation",
}

interface Operations extends Azure.ResourceManager.Operations {}
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,48 @@
}
},
"definitions": {
"Azure.ResourceManager.CommonTypes.ExtendedLocation": {
"type": "object",
"description": "The complex type of the extended location.",
"properties": {
"name": {
"type": "string",
"description": "The name of the extended location."
},
"type": {
"$ref": "#/definitions/Azure.ResourceManager.CommonTypes.ExtendedLocationType",
"description": "The type of the extended location."
}
},
"required": [
"name",
"type"
]
},
"Azure.ResourceManager.CommonTypes.ExtendedLocationType": {
"type": "string",
"description": "The supported ExtendedLocation types.",
"enum": [
"EdgeZone",
"CustomLocation"
],
"x-ms-enum": {
"name": "ExtendedLocationType",
"modelAsString": true,
"values": [
{
"name": "EdgeZone",
"value": "EdgeZone",
"description": "Azure Edge Zones location type"
},
{
"name": "CustomLocation",
"value": "CustomLocation",
"description": "Azure Custom Locations type"
}
]
}
},
"AzureMonitorWorkspace": {
"type": "object",
"description": "An Azure Monitor Workspace definition.",
Expand Down Expand Up @@ -1008,42 +1050,6 @@
]
}
},
"ExtendedLocation": {
"type": "object",
"description": "The extended location info.",
"properties": {
"type": {
"$ref": "#/definitions/ExtendedLocationType",
"description": "The type of extended location."
},
"name": {
"type": "string",
"description": "The name of extended location."
}
},
"required": [
"type",
"name"
]
},
"ExtendedLocationType": {
"type": "string",
"description": "The extended location type.",
"enum": [
"CustomLocation"
],
"x-ms-enum": {
"name": "ExtendedLocationType",
"modelAsString": true,
"values": [
{
"name": "CustomLocation",
"value": "CustomLocation",
"description": "Custom location."
}
]
}
},
"ExternalNetworkingMode": {
"type": "string",
"description": "The mode of the external networking.",
Expand Down Expand Up @@ -1179,16 +1185,6 @@
"persistentVolumeName"
]
},
"PersistenceConfigurationsUpdate": {
"type": "object",
"description": "Persistence options to all pipelines in the instance.",
"properties": {
"persistentVolumeName": {
"type": "string",
"description": "The name of the mounted persistent volume."
}
}
},
"Pipeline": {
"type": "object",
"description": "Pipeline Info.",
Expand Down Expand Up @@ -1244,7 +1240,7 @@
"x-ms-client-flatten": true
},
"extendedLocation": {
"$ref": "#/definitions/ExtendedLocation",
"$ref": "#/definitions/Azure.ResourceManager.CommonTypes.ExtendedLocation",
"description": "The extended location for given pipeline group.",
"x-ms-mutability": [
"read",
Expand Down Expand Up @@ -1389,7 +1385,7 @@
"x-ms-identifiers": []
},
"service": {
"$ref": "#/definitions/ServiceUpdate",
"$ref": "#/definitions/Service",
"description": "The service section for a given pipeline group instance."
},
"networkingConfigurations": {
Expand Down Expand Up @@ -1710,25 +1706,6 @@
"pipelines"
]
},
"ServiceUpdate": {
"type": "object",
"description": "Service Info.",
"properties": {
"pipelines": {
"type": "array",
"description": "Pipelines belonging to a given pipeline group.",
"items": {
"$ref": "#/definitions/Pipeline"
},
"x-ms-identifiers": []
},
"persistence": {
"$ref": "#/definitions/PersistenceConfigurationsUpdate",
"description": "Persistence options to all pipelines in the instance.",
"x-ms-identifiers": []
}
}
},
"SyslogReceiver": {
"type": "object",
"description": "Base receiver using TCP as transport protocol.",
Expand Down

0 comments on commit cf40604

Please sign in to comment.