Skip to content

Commit

Permalink
Microsoft.Monitor add missing etag attribute to /accounts to keep bac…
Browse files Browse the repository at this point in the history
…kwards compatibility with non typespec version. (#29944)

Work item:
https://msazure.visualstudio.com/One/_workitems/edit/28464928
  • Loading branch information
andborja authored Jul 25, 2024
1 parent cb843b3 commit 8cbd903
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ options:
examples-directory: "examples"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuremonitor.json"
new-line: lf
omit-unreachable-types: true
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ model AzureMonitorWorkspace
@path
@segment("accounts")
name: string;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "ETag is not included in TrackedResource."
@doc("Resource entity tag (ETag)")
@visibility("read")
etag?: string;
}

@doc("Properties that need to be specified to create a new workspace.")
Expand All @@ -33,6 +38,10 @@ model AzureMonitorWorkspaceProperties {
@doc("Information about metrics for the Azure Monitor workspace")
metrics?: Metrics;

@doc("The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.")
@visibility("read")
provisioningState?: ProvisioningState;

@doc("The Data Collection Rule and Endpoint used for ingestion by default.")
@visibility("read")
defaultIngestionSettings?: IngestionSettings;
Expand All @@ -44,10 +53,6 @@ model AzureMonitorWorkspaceProperties {
@doc("Gets or sets allow or disallow public network access to workspace")
@visibility("read")
publicNetworkAccess?: PublicNetworkAccess;

@doc("The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.")
@visibility("read")
provisioningState?: ProvisioningState;
}

@doc("Information about metrics for the workspace")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@
"$ref": "#/definitions/AzureMonitorWorkspaceProperties",
"description": "The resource-specific properties for this resource.",
"x-ms-client-flatten": true
},
"etag": {
"type": "string",
"description": "Resource entity tag (ETag)",
"readOnly": true
}
},
"allOf": [
Expand Down Expand Up @@ -843,6 +848,11 @@
"$ref": "#/definitions/Metrics",
"description": "Information about metrics for the Azure Monitor workspace"
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.",
"readOnly": true
},
"defaultIngestionSettings": {
"$ref": "#/definitions/IngestionSettings",
"description": "The Data Collection Rule and Endpoint used for ingestion by default.",
Expand All @@ -860,11 +870,6 @@
"$ref": "#/definitions/PublicNetworkAccess",
"description": "Gets or sets allow or disallow public network access to workspace",
"readOnly": true
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy.",
"readOnly": true
}
}
},
Expand Down Expand Up @@ -1724,78 +1729,6 @@
}
}
},
"StreamEncodingType": {
"type": "string",
"description": "Encoding types for streams.",
"enum": [
"nop",
"utf-8",
"utf-16le",
"utf-16be",
"ascii",
"big5"
],
"x-ms-enum": {
"name": "StreamEncodingType",
"modelAsString": true,
"values": [
{
"name": "nop",
"value": "nop",
"description": "No encoding validation. Treats the file as a stream of raw bytes."
},
{
"name": "utf_8",
"value": "utf-8",
"description": "UTF-8 encoding."
},
{
"name": "utf_16le",
"value": "utf-16le",
"description": "UTF-16 encoding with little-endian byte order."
},
{
"name": "utf_16be",
"value": "utf-16be",
"description": "UTF-16 encoding with little-endian byte order."
},
{
"name": "ascii",
"value": "ascii",
"description": "ASCII encoding."
},
{
"name": "big5",
"value": "big5",
"description": "The Big5 Chinese character encoding."
}
]
}
},
"SyslogProtocol": {
"type": "string",
"description": "The syslog protocol to parse messages.",
"enum": [
"rfc3164",
"rfc5424"
],
"x-ms-enum": {
"name": "SyslogProtocol",
"modelAsString": true,
"values": [
{
"name": "rfc3164",
"value": "rfc3164",
"description": "rfc3164 protocol."
},
{
"name": "rfc5424",
"value": "rfc5424",
"description": "rfc5424 protocol."
}
]
}
},
"SyslogReceiver": {
"type": "object",
"description": "Base receiver using TCP as transport protocol.",
Expand Down Expand Up @@ -1849,20 +1782,6 @@
"url"
]
},
"TcpReceiver": {
"type": "object",
"description": "Base receiver using TCP as transport protocol.",
"properties": {
"endpoint": {
"type": "string",
"description": "TCP endpoint definition. Example: 0.0.0.0:<port>.",
"pattern": "^[a-zA-Z0-9-\\.]+:[0-9]+$"
}
},
"required": [
"endpoint"
]
},
"UdpReceiver": {
"type": "object",
"description": "Receiver using UDP as transport protocol.",
Expand Down

0 comments on commit 8cbd903

Please sign in to comment.