From 4e8d56f8b6d2e54aacaf15bce8f4ee3897a33e8b Mon Sep 17 00:00:00 2001 From: Vikeshi Tiwari Date: Wed, 18 Mar 2026 15:15:17 -0400 Subject: [PATCH] Add minimal Microsoft.Barbie RP (no lease) --- specification/barbie/cspell.yaml | 2 + .../Microsoft.Barbie/Barbie/main.tsp | 61 +++ .../preview/2024-01-01-preview/barbie.json | 411 ++++++++++++++++++ .../Microsoft.Barbie/Barbie/readme.md | 26 ++ .../Microsoft.Barbie/Barbie/tspconfig.yaml | 14 + .../barbie/resource-manager/readme.md | 3 + 6 files changed, 517 insertions(+) create mode 100644 specification/barbie/cspell.yaml create mode 100644 specification/barbie/resource-manager/Microsoft.Barbie/Barbie/main.tsp create mode 100644 specification/barbie/resource-manager/Microsoft.Barbie/Barbie/preview/2024-01-01-preview/barbie.json create mode 100644 specification/barbie/resource-manager/Microsoft.Barbie/Barbie/readme.md create mode 100644 specification/barbie/resource-manager/Microsoft.Barbie/Barbie/tspconfig.yaml create mode 100644 specification/barbie/resource-manager/readme.md diff --git a/specification/barbie/cspell.yaml b/specification/barbie/cspell.yaml new file mode 100644 index 000000000000..298a323abfa8 --- /dev/null +++ b/specification/barbie/cspell.yaml @@ -0,0 +1,2 @@ +words: + - barbie diff --git a/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/main.tsp b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/main.tsp new file mode 100644 index 000000000000..d031e3f25a54 --- /dev/null +++ b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/main.tsp @@ -0,0 +1,61 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; + +/** Microsoft.Barbie Resource Provider management API. */ +@armProviderNamespace +@service(#{ title: "Barbie" }) +@versioned(Microsoft.Barbie.Versions) +namespace Microsoft.Barbie; + +/** The available API versions. */ +enum Versions { + /** 2024-01-01-preview version */ + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + v2024_01_01_preview: "2024-01-01-preview", +} + +interface Operations extends Azure.ResourceManager.Operations {} + +/** A Barbie resource */ +model BarbieResource is TrackedResource { + ...ResourceNameParameter; +} + +/** Barbie resource properties */ +model BarbieProperties { + /** Display name */ + displayName?: string; + + /** The provisioning state */ + @visibility(Lifecycle.Read) + provisioningState?: ProvisioningState; +} + +/** The resource provisioning state. */ +@lroStatus +union ProvisioningState { + ResourceProvisioningState, + + /** The resource is being provisioned */ + Provisioning: "Provisioning", + + string, +} + +@armResourceOperations +interface BarbieResources { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + delete is ArmResourceDeleteWithoutOkAsync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; +} diff --git a/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/preview/2024-01-01-preview/barbie.json b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/preview/2024-01-01-preview/barbie.json new file mode 100644 index 000000000000..8eec0a1e15ab --- /dev/null +++ b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/preview/2024-01-01-preview/barbie.json @@ -0,0 +1,411 @@ +{ + "swagger": "2.0", + "info": { + "title": "Barbie", + "version": "2024-01-01-preview", + "description": "Microsoft.Barbie Resource Provider management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "BarbieResources" + } + ], + "paths": { + "/providers/Microsoft.Barbie/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Barbie/barbieResources": { + "get": { + "operationId": "BarbieResources_ListBySubscription", + "tags": [ + "BarbieResources" + ], + "description": "List BarbieResource resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BarbieResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Barbie/barbieResources": { + "get": { + "operationId": "BarbieResources_ListByResourceGroup", + "tags": [ + "BarbieResources" + ], + "description": "List BarbieResource resources by resource group", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BarbieResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Barbie/barbieResources/{barbieResourceName}": { + "get": { + "operationId": "BarbieResources_Get", + "tags": [ + "BarbieResources" + ], + "description": "Get a BarbieResource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "barbieResourceName", + "in": "path", + "description": "The name of the BarbieResource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BarbieResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "BarbieResources_CreateOrUpdate", + "tags": [ + "BarbieResources" + ], + "description": "Create a BarbieResource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "barbieResourceName", + "in": "path", + "description": "The name of the BarbieResource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/BarbieResource" + } + } + ], + "responses": { + "200": { + "description": "Resource 'BarbieResource' update operation succeeded", + "schema": { + "$ref": "#/definitions/BarbieResource" + } + }, + "201": { + "description": "Resource 'BarbieResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/BarbieResource" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "BarbieResources_Delete", + "tags": [ + "BarbieResources" + ], + "description": "Delete a BarbieResource", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "barbieResourceName", + "in": "path", + "description": "The name of the BarbieResource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "BarbieProperties": { + "type": "object", + "description": "Barbie resource properties", + "properties": { + "displayName": { + "type": "string", + "description": "Display name" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The provisioning state", + "readOnly": true + } + } + }, + "BarbieResource": { + "type": "object", + "description": "A Barbie resource", + "properties": { + "properties": { + "$ref": "#/definitions/BarbieProperties", + "description": "The resource-specific properties for this resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ] + }, + "BarbieResourceListResult": { + "type": "object", + "description": "The response of a BarbieResource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The BarbieResource items on this page", + "items": { + "$ref": "#/definitions/BarbieResource" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ProvisioningState": { + "type": "string", + "description": "The resource provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + } + ] + }, + "readOnly": true + } + }, + "parameters": {} +} diff --git a/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/readme.md b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/readme.md new file mode 100644 index 000000000000..0687fbec5e73 --- /dev/null +++ b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/readme.md @@ -0,0 +1,26 @@ +# Barbie + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Barbie. + +## Configuration + +### Basic Information + +```yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-2024-01-01-preview +``` + +### Tag: package-2024-01-01-preview + +These settings apply only when `--tag=package-2024-01-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2024-01-01-preview' +input-file: + - preview/2024-01-01-preview/barbie.json +``` + +--- diff --git a/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/tspconfig.yaml b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/tspconfig.yaml new file mode 100644 index 000000000000..a53490f08079 --- /dev/null +++ b/specification/barbie/resource-manager/Microsoft.Barbie/Barbie/tspconfig.yaml @@ -0,0 +1,14 @@ +parameters: + "service-dir": + default: "sdk/barbie" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + output-file: "{version-status}/{version}/barbie.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/barbie/resource-manager/readme.md b/specification/barbie/resource-manager/readme.md new file mode 100644 index 000000000000..ee801f25272e --- /dev/null +++ b/specification/barbie/resource-manager/readme.md @@ -0,0 +1,3 @@ +# Microsoft.Barbie + +> see https://aka.ms/autorest