Skip to content

Commit

Permalink
ResourceTypeName rename from AzureExtendedZones to ExtendedZones (#28290
Browse files Browse the repository at this point in the history
)

* ResourceTypeName correction. Changeing AzureExtendedeZones to ExtendedZones. A resourceTypeName with the word "Azure" is causing problems with SDK generation and Powershell module generation. Resource naming guidelines says not to use branded names.

* Updating typespec and swagger with more detailed doc descriptions.

* Updating main.tsp

* Updating main.tsp and edgezones.json
  • Loading branch information
jasonurban1 authored and vxfield committed Mar 28, 2024
1 parent de99df8 commit 7fb98fd
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"operationId": "AzureExtendedZones_Get",
"title": "GetAzureExtendedZone",
"operationId": "ExtendedZones_Get",
"title": "GetExtendedZone",
"parameters": {
"api-version": "2024-04-01-preview",
"subscriptionId": "a1ffc958-d2c7-493e-9f1e-125a0477f536",
"azureExtendedZoneName": "losangeles"
"extendedZoneName": "losangeles"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/azureExtendedZones/losangeles",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/extendedZones/losangeles",
"name": "losangeles",
"type": "microsoft.edgezones/azureextendedzones",
"type": "Microsoft.EdgeZones/extendedZones",
"properties": {
"provisioningState": "Succeeded",
"registrationState": "NotRegistered",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AzureExtendedZones_ListBySubscription",
"title": "ListAzureExtendedZones",
"operationId": "ExtendedZones_ListBySubscription",
"title": "ListExtendedZones",
"parameters": {
"api-version": "2024-04-01-preview",
"subscriptionId": "a1ffc958-d2c7-493e-9f1e-125a0477f536"
Expand All @@ -10,9 +10,9 @@
"body": {
"value": [
{
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/azureExtendedZones/redmond",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/extendedZones/redmond",
"name": "redmond",
"type": "microsoft.edgezones/azureextendedzones",
"type": "Microsoft.EdgeZones/extendedZones",
"properties": {
"provisioningState": "Succeeded",
"registrationState": "NotRegistered",
Expand All @@ -28,9 +28,9 @@
}
},
{
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/azureExtendedZones/losangeles",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/extendedZones/losangeles",
"name": "losangeles",
"type": "microsoft.edgezones/azureextendedzones",
"type": "Microsoft.EdgeZones/extendedZones",
"properties": {
"provisioningState": "Succeeded",
"registrationState": "NotRegistered",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"operationId": "AzureExtendedZones_Register",
"title": "RegisterAzureExtendedZone",
"operationId": "ExtendedZones_Register",
"title": "RegisterExtendedZone",
"parameters": {
"api-version": "2024-04-01-preview",
"subscriptionId": "a1ffc958-d2c7-493e-9f1e-125a0477f536",
"azureExtendedZoneName": "losangeles"
"extendedZoneName": "losangeles"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/azureExtendedZones/losangeles",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/extendedZones/losangeles",
"name": "losangeles",
"type": "microsoft.edgezones/azureextendedzones",
"type": "Microsoft.EdgeZones/extendedZones",
"properties": {
"provisioningState": "Succeeded",
"registrationState": "PendingRegister",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"operationId": "AzureExtendedZones_Unregister",
"title": "UnregisterAzureExtendedZone",
"operationId": "ExtendedZones_Unregister",
"title": "UnregisterExtendedZone",
"parameters": {
"api-version": "2024-04-01-preview",
"subscriptionId": "a1ffc958-d2c7-493e-9f1e-125a0477f536",
"azureExtendedZoneName": "losangeles"
"extendedZoneName": "losangeles"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/azureExtendedZones/losangeles",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/providers/Microsoft.EdgeZones/extendedZones/losangeles",
"name": "losangeles",
"type": "microsoft.edgezones/azureextendedzones",
"type": "Microsoft.EdgeZones/extendedZones",
"properties": {
"provisioningState": "Succeeded",
"registrationState": "PendingUnregister",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"body": {
"value": [
{
"name": "Microsoft.EdgeZones/azureExtendedZones/read",
"name": "Microsoft.EdgeZones/extendedZones/read",
"display": {
"provider": "Microsoft.EdgeZones",
"resource": "azureExtendedZones",
"resource": "extendedZones",
"operation": "read"
}
}
Expand Down
75 changes: 42 additions & 33 deletions specification/edgezones/EdgeZones.Management/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -46,66 +46,75 @@ enum ProvisioningState {
Accepted,
}

@doc("The Azure Extended Zone registration status for a subscription.")
@doc("The Azure Extended Zone registration status for a subscription")
enum RegistrationState {
@doc("Not Registered State")
@doc("Subscription not registered for the Azure Extended Zone")
NotRegistered,

@doc("Pending Register State")
@doc("Subscription pending registration for the Azure Extended Zone")
PendingRegister,

@doc("Registered State")
@doc("Subscription is registered for the Azure Extended Zone")
Registered,

@doc("Pending Unregister State")
@doc("Subscription is pending unregistering for the Azure Extended Zone")
PendingUnregister,
}

@doc("The properties of an AzureExtendedZone Resource")
model AzureExtendedZoneProperties {
@doc("The properties of an Extended Zone resource.")
model ExtendedZoneProperties {
@visibility("read")
@doc("The status of the last operation.")
@doc("Status of the last operation performed by the subscription on the Edge Zone resource")
provisioningState?: ProvisioningState;

@visibility("read")
@doc("AzureExtendedZone registration approved or not")
@doc("Indicates the Azure Extended Zone registration’s approval status.")
registrationState?: RegistrationState;

@doc("AzureExtendedZone displayName")
@visibility("read")
@doc("Display name of the Azure Extended Zone.")
displayName: string;

@doc("AzureExtendedZone regionalDisplayName")
@visibility("read")
@doc("Regional display name of the Azure Extended Zone.")
regionalDisplayName: string;

@doc("AzureExtendedZone regionType")
@visibility("read")
@doc("Type of region for the Azure Extended Zone.")
regionType: string;

@doc("AzureExtendedZone regionCategory")
@visibility("read")
@doc("Category of region for the Azure Extended Zone.")
regionCategory: string;

@doc("AzureExtendedZone geography")
@visibility("read")
@doc("Geography of the Azure Extended Zone.")
geography: string;

@doc("AzureExtendedZone geographyGroup")
@visibility("read")
@doc("The Geography Group of the Azure Extended Zone.")
geographyGroup: string;

@doc("AzureExtendedZone longitude")
@visibility("read")
@doc("The Longitude of the Azure Extended Zone.")
longitude: string;

@doc("AzureExtendedZone latitude")
@visibility("read")
@doc("The Latitude of the Azure Extended Zone.")
latitude: string;

@doc("AzureExtendedZone homeLocation")
@visibility("read")
@doc("The Home Location of the Azure Extended Zone.")
homeLocation: string;
}

@doc("An AzureExtendedZone resource")
@doc("Resource that represents an Azure Extended Zone available to a subscription for registering and unregistering.")
@subscriptionResource
model AzureExtendedZone is ProxyResource<AzureExtendedZoneProperties> {
@doc("The name of the AzureExtendedZone")
model ExtendedZone is ProxyResource<ExtendedZoneProperties> {
@doc("The name of the ExtendedZone")
@pattern("^[a-zA-Z0-9-]{3,24}$")
@key("azureExtendedZoneName")
@segment("azureExtendedZones")
@key("extendedZoneName")
@segment("extendedZones")
@path
name: string;
}
Expand All @@ -123,18 +132,18 @@ op ArmResourceActionNoBodySync<
...ResourceInstanceParameters<TResource, TBaseParameters>,
): ArmResponse<TResource> | ErrorResponse;

@doc("AzureExtendedZone operations")
@doc("ExtendedZone operations")
@armResourceOperations
interface AzureExtendedZones {
@doc("Get an Azure Extended Zone for a subscription")
get is ArmResourceRead<AzureExtendedZone>;
interface ExtendedZones {
@doc("Gets an Azure Extended Zone for a subscription")
get is ArmResourceRead<ExtendedZone>;

@doc("Lists the Azure Extended Zones for a subscription")
listBySubscription is ArmListBySubscription<AzureExtendedZone>;
@doc("Lists the Azure Extended Zones available to a subscription")
listBySubscription is ArmListBySubscription<ExtendedZone>;

@doc("Registers a subscription for an Azure Extended Zone")
register is ArmResourceActionNoBodySync<AzureExtendedZone>;
@doc("Registers a subscription for an Extended Zone")
register is ArmResourceActionNoBodySync<ExtendedZone>;

@doc("Unregisters a subscription for an Azure Extended Zone")
unregister is ArmResourceActionNoBodySync<AzureExtendedZone>;
@doc("Unregisters a subscription for an Extended Zone")
unregister is ArmResourceActionNoBodySync<ExtendedZone>;
}
Loading

0 comments on commit 7fb98fd

Please sign in to comment.