Skip to content

Commit

Permalink
Create Mircosoft.VerifiedId Resource Provider public preview (Azure#2…
Browse files Browse the repository at this point in the history
…8933)

* copy verifiedid from private

* fix latest style rules

* rerun validate

* change key name

* re-run local validation

* update examples

* manually fix generated docs

* trying to make it pass validation, local validation won't run

* maybe fixed?

* fix lists?
  • Loading branch information
mmorr-msft authored May 31, 2024
1 parent bc06df2 commit 775b4ba
Show file tree
Hide file tree
Showing 24 changed files with 1,138 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"operationId": "Authorities_CreateOrUpdate",
"title": "CreateAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111",
"resource": {
"properties": {},
"location": "westus"
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/aurthorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/aurthorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"operationId": "Authorities_Delete",
"title": "DeleteAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"operationId": "Authorities_Get",
"title": "GetAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"title": "Authorities_ListByResourceGroup",
"operationId": "Authorities_ListByResourceGroup",
"parameters": {
"api-version": "2024-01-26-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg"
},
"responses": {
"200": {
"body": {
"value": [
{
"location": "centralus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"systemData": {
"createdBy": "ypsrynjsvwvcooacwzwb",
"createdByType": "User",
"createdAt": "2023-12-28T17:24:15.284Z",
"lastModifiedBy": "qlojlakxwe",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-12-28T17:24:15.284Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities?api-version=2024-01-26-preview&$skiptoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"title": "Authorities_ListBySubscription",
"operationId": "Authorities_ListBySubscription",
"parameters": {
"api-version": "2024-01-26-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"value": [
{
"location": "centralus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"systemData": {
"createdBy": "ypsrynjsvwvcooacwzwb",
"createdByType": "User",
"createdAt": "2023-12-28T17:24:15.284Z",
"lastModifiedBy": "qlojlakxwe",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-12-28T17:24:15.284Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities?api-version=2024-01-26-preview&$skiptoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"operationId": "Authorities_Update",
"title": "UpdateAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111",
"properties": {}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/aurthorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"title": "Operations_List",
"operationId": "Operations_List",
"parameters": {
"api-version": "2024-01-26-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.VerifiedId/Authorities/read",
"isDataAction": true,
"display": {
"provider": "Microsoft.VerifiedId",
"resource": "Authorities",
"operation": "read",
"description": "Read the Authority resources for the Verified ID service."
},
"origin": "user",
"actionType": "Internal"
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/operations?api-version=2024-01-26-preview"
}
}
}
}
79 changes: 79 additions & 0 deletions specification/verifiedid/Microsoft.VerifiedId/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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;

@armProviderNamespace("Microsoft.VerifiedId")
@service({
title: "VerifiedIdMgmtClient",
})
@versioned(Microsoft.VerifiedId.Versions)
@doc("VerifiedId Resource Provider management API.")
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
namespace Microsoft.VerifiedId;

/**
* Supported versions for Microsoft.VerifiedId.
*/
enum Versions {
/**
* The 2024-01-26-preview version of the Microsoft.VerifiedId resource provider.
*/
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
v2024_01_26_preview: "2024-01-26-preview",
}

interface Operations extends Azure.ResourceManager.Operations {}

@doc("A VerifiedId authority resource")
model Authority is TrackedResource<AuthorityProperties> {
@doc("The ID of the authority")
@pattern("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
@key("authorityName")
@segment("authorities")
@path
name: string;
}

@doc("The status of the current operation.")
@Azure.Core.lroStatus
union ProvisioningState {
string,
ResourceProvisioningState,

@doc("Initial provisioning in progress")
Provisioning: "Provisioning",

@doc("Update in progress")
Updating: "Updating",

@doc("Deletion in progress")
Deleting: "Deleting",

@doc("Change accepted for processing")
Accepted: "Accepted",
}

@doc("Details of the VerifiedId Authority.")
model AuthorityProperties {
@visibility("read")
@doc("The status of the last operation.")
provisioningState?: ProvisioningState;
}

@armResourceOperations(Authority)
interface Authorities {
get is ArmResourceRead<Authority>;
createOrUpdate is ArmResourceCreateOrReplaceAsync<Authority>;
update is ArmResourcePatchSync<Authority, AuthorityProperties>;
delete is ArmResourceDeleteSync<Authority>;
listByResourceGroup is ArmResourceListByParent<Authority>;
listBySubscription is ArmListBySubscription<Authority>;
}
12 changes: 12 additions & 0 deletions specification/verifiedid/Microsoft.VerifiedId/tspconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
linter:
extends:
- "@azure-tools/typespec-azure-resource-manager/all"
emit:
- "@azure-tools/typespec-autorest"
options:
"@azure-tools/typespec-autorest":
azure-resource-provider-folder: "resource-manager"
emitter-output-dir: "{project-root}/.."
examples-directory: "examples"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/verifiedid.json"
use-read-only-status-schema: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"operationId": "Authorities_CreateOrUpdate",
"title": "CreateAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111",
"resource": {
"properties": {},
"location": "westus"
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/aurthorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/aurthorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"operationId": "Authorities_Delete",
"title": "DeleteAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"operationId": "Authorities_Get",
"title": "GetAuthority",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg",
"api-version": "2024-01-26-preview",
"authorityName": "00000000-0000-0000-0000-000000000111"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"properties": {
"provisioningState": "Succeeded"
},
"location": "westus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"title": "Authorities_ListByResourceGroup",
"operationId": "Authorities_ListByResourceGroup",
"parameters": {
"api-version": "2024-01-26-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testrg"
},
"responses": {
"200": {
"body": {
"value": [
{
"location": "centralus",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities/00000000-0000-0000-0000-000000000111",
"type": "Microsoft.VerifiedId/authorities",
"systemData": {
"createdBy": "ypsrynjsvwvcooacwzwb",
"createdByType": "User",
"createdAt": "2023-12-28T17:24:15.284Z",
"lastModifiedBy": "qlojlakxwe",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-12-28T17:24:15.284Z"
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.VerifiedId/authorities?api-version=2024-01-26-preview&$skiptoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
}
}
}
Loading

0 comments on commit 775b4ba

Please sign in to comment.