From da2472e83018e34735afd62c322084a973a56818 Mon Sep 17 00:00:00 2001 From: dshravani <92446213+dshravani@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:33:04 +0530 Subject: [PATCH 1/2] Generate new Service for communitytraining --- .../stable/2023-11-01/communitytraining.json | 132 ++++++++++++++++++ .../examples/OperationGroupGet.json | 15 ++ .../resource-manager/readme.az.md | 28 ++++ .../resource-manager/readme.cli.md | 1 + .../resource-manager/readme.csharp.md | 15 ++ .../resource-manager/readme.go.md | 11 ++ .../resource-manager/readme.md | 78 +++++++++++ .../resource-manager/readme.python.md | 18 +++ .../resource-manager/readme.typescript.md | 14 ++ 9 files changed, 312 insertions(+) create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json create mode 100644 specification/communitytraining/resource-manager/readme.az.md create mode 100644 specification/communitytraining/resource-manager/readme.cli.md create mode 100644 specification/communitytraining/resource-manager/readme.csharp.md create mode 100644 specification/communitytraining/resource-manager/readme.go.md create mode 100644 specification/communitytraining/resource-manager/readme.md create mode 100644 specification/communitytraining/resource-manager/readme.python.md create mode 100644 specification/communitytraining/resource-manager/readme.typescript.md diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json new file mode 100644 index 000000000000..7ed4ca107ca3 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json @@ -0,0 +1,132 @@ +{ + "swagger": "2.0", + "info": { + "version": "2023-11-01", + "title": "communitytraining", + "description": "Description of the new service", + "x-ms-code-generation-settings": { + "name": "communitytrainingClient" + } + }, + "host": "management.azure.com", + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], + "security": [ + { + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Community/operations": { + "get": { + "tags": ["Tag1"], + "operationId": "OperationGroup_Get", + "x-ms-examples": { + "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } + }, + "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Describe the result of a successful operation.", + "schema": { + "$ref": "#/definitions/Result" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Result": { + "description": "Sample result definition", + "properties": { + "sampleProperty": { + "type": "string", + "description": "Sample property of type string" + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json new file mode 100644 index 000000000000..f65c464f8e23 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sampleacct", + "resourceGroupName": "communitytrainingClient", + "api-version": "2023-11-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "sampleProperty": "sampleProperty" + } + } + } +} diff --git a/specification/communitytraining/resource-manager/readme.az.md b/specification/communitytraining/resource-manager/readme.az.md new file mode 100644 index 000000000000..58e56911e8f2 --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.az.md @@ -0,0 +1,28 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: communitytraining + namespace: azure.mgmt.communitytraining + package-name: azure-mgmt-communitytraining +az-output-folder: $(azure-cli-extension-folder)/src/communitytraining +python-sdk-output-folder: "$(az-output-folder)/azext_communitytraining/vendored_sdks/communitytraining" +# add additional configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + + + +This is for command modules that already in azure cli main repo. +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: communitytraining + namespace: azure.mgmt.communitytraining + package-name: azure-mgmt-communitytraining +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/communitytraining +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/communitytraining" +``` \ No newline at end of file diff --git a/specification/communitytraining/resource-manager/readme.cli.md b/specification/communitytraining/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/communitytraining/resource-manager/readme.csharp.md b/specification/communitytraining/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..296439823ae4 --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Community + output-folder: $(csharp-sdks-folder)/communitytraining/management/Microsoft.Community/GeneratedProtocol +``` diff --git a/specification/communitytraining/resource-manager/readme.go.md b/specification/communitytraining/resource-manager/readme.go.md new file mode 100644 index 000000000000..08edc6b3fa1e --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/communitytraining/armcommunitytraining +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` diff --git a/specification/communitytraining/resource-manager/readme.md b/specification/communitytraining/resource-manager/readme.md new file mode 100644 index 000000000000..e670711f1ce3 --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.md @@ -0,0 +1,78 @@ +# communitytraining + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for communitytraining. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the communitytraining. + +```yaml +openapi-type: arm +tag: package-2023-11-01 +``` + +### Tag: package-2023-11-01 + +These settings apply only when `--tag=package-2023-11-01` is specified on the command line. + +```yaml $(tag) == 'package-2023-11-01' +input-file: + - Microsoft.Community/stable/2023-11-01/communitytraining.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + - repo: azure-cli-extensions + - repo: azure-powershell +``` +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/communitytraining/resource-manager/readme.python.md b/specification/communitytraining/resource-manager/readme.python.md new file mode 100644 index 000000000000..e2b0c4695492 --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.python.md @@ -0,0 +1,18 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-communitytraining +namespace: azure.mgmt.communitytraining +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/communitytraining/azure-mgmt-communitytraining/azure/mgmt/communitytraining +``` diff --git a/specification/communitytraining/resource-manager/readme.typescript.md b/specification/communitytraining/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..e17e90e6b90e --- /dev/null +++ b/specification/communitytraining/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-communitytraining" + output-folder: "$(typescript-sdks-folder)/sdk/communitytraining/arm-communitytraining" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +``` From f98ddbc197574d0014d489c540324bda139c0805 Mon Sep 17 00:00:00 2001 From: Deeksha Shravani Date: Mon, 6 Nov 2023 22:11:35 +0530 Subject: [PATCH 2/2] Adding CommunityTrainings Specification --- .../examples/CommunityTrainings_Create.json | 121 +++ .../examples/CommunityTrainings_Delete.json | 19 + .../examples/CommunityTrainings_Get.json | 52 ++ ...ommunityTrainings_ListByResourceGroup.json | 55 ++ ...CommunityTrainings_ListBySubscription.json | 54 ++ .../examples/CommunityTrainings_Update.json | 77 ++ .../examples/Operations_List.json | 75 ++ .../Community.Management/main.tsp | 141 +++ .../Community.Management/tspconfig.yaml | 11 + .../stable/2023-11-01/CommunityTrainings.json | 822 ++++++++++++++++++ .../stable/2023-11-01/communitytraining.json | 132 --- .../examples/CommunityTrainings_Create.json | 121 +++ .../examples/CommunityTrainings_Delete.json | 19 + .../examples/CommunityTrainings_Get.json | 52 ++ ...ommunityTrainings_ListByResourceGroup.json | 55 ++ ...CommunityTrainings_ListBySubscription.json | 54 ++ .../examples/CommunityTrainings_Update.json | 77 ++ .../examples/OperationGroupGet.json | 15 - .../2023-11-01/examples/Operations_List.json | 75 ++ .../resource-manager/readme.md | 3 +- 20 files changed, 1882 insertions(+), 148 deletions(-) create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_Create.json create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_Delete.json create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_Get.json create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_ListByResourceGroup.json create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_ListBySubscription.json create mode 100644 specification/communitytraining/Community.Management/examples/CommunityTrainings_Update.json create mode 100644 specification/communitytraining/Community.Management/examples/Operations_List.json create mode 100644 specification/communitytraining/Community.Management/main.tsp create mode 100644 specification/communitytraining/Community.Management/tspconfig.yaml create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/CommunityTrainings.json delete mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Create.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Delete.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Get.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListByResourceGroup.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListBySubscription.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Update.json delete mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json create mode 100644 specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/Operations_List.json diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_Create.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Create.json new file mode 100644 index 000000000000..a12898004aa9 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Create.json @@ -0,0 +1,121 @@ +{ + "title": "CreateCommunityTrainings", + "operationId": "CommunityTrainings_Create", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTaining", + "communityTrainingName": "ctApplication", + "resource": { + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "clientSecret": "idenityConfigurationClientSecret", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + } + } +} diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_Delete.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Delete.json new file mode 100644 index 000000000000..dc31b3f999f4 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Delete.json @@ -0,0 +1,19 @@ +{ + "title": "DeleteCommunityTrainings", + "operationId": "CommunityTrainings_Delete", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + } + }, + "204": {} + } +} diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_Get.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Get.json new file mode 100644 index 000000000000..c06816dd6567 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Get.json @@ -0,0 +1,52 @@ +{ + "title": "GetCommunityTrainings", + "operationId": "CommunityTrainings_Get", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + } + } +} diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListByResourceGroup.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListByResourceGroup.json new file mode 100644 index 000000000000..a15881ee15a3 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListByResourceGroup.json @@ -0,0 +1,55 @@ +{ + "title": "ListByResourceGroupCommunityTrainings", + "operationId": "CommunityTrainings_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + ] + } + } + } +} diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListBySubscription.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListBySubscription.json new file mode 100644 index 000000000000..9451b4a15b10 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_ListBySubscription.json @@ -0,0 +1,54 @@ +{ + "title": "ListBySubscriptionCommunityTrainings", + "operationId": "CommunityTrainings_ListBySubscription", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + ] + } + } + } +} diff --git a/specification/communitytraining/Community.Management/examples/CommunityTrainings_Update.json b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Update.json new file mode 100644 index 000000000000..719130dbc882 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/CommunityTrainings_Update.json @@ -0,0 +1,77 @@ +{ + "title": "UpdateCommunityTrainings", + "operationId": "CommunityTrainings_Update", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication", + "properties": { + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "properties": { + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "clientSecret": "idenityConfigurationClientSecret", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + } + } + } +} diff --git a/specification/communitytraining/Community.Management/examples/Operations_List.json b/specification/communitytraining/Community.Management/examples/Operations_List.json new file mode 100644 index 000000000000..b22bf1f25795 --- /dev/null +++ b/specification/communitytraining/Community.Management/examples/Operations_List.json @@ -0,0 +1,75 @@ +{ + "title": "ListOperations", + "operationId": "Operations_List", + "parameters": { + "api-version": "2023-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "display": { + "description": "List CommunityTrainings Resource resources by subscription ID", + "operation": "CommunityTrainings_ListBySubscription", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "List CommunityTrainings Resource resources by resource group", + "operation": "CommunityTrainings_ListByResourceGroup", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "Get a CommunityTrainings Resource", + "operation": "CommunityTrainings_Get", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "Create a CommunityTrainings Resource", + "operation": "CommunityTrainings_Create", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/write" + }, + { + "display": { + "description": "Delete a CommunityTraining Resource", + "operation": "CommunityTrainings_Delete", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/delete" + }, + { + "display": { + "description": "Update a CommunityTrainings Resource", + "operation": "CommunityTrainings_Update", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/write" + } + ] + } + } + } +} diff --git a/specification/communitytraining/Community.Management/main.tsp b/specification/communitytraining/Community.Management/main.tsp new file mode 100644 index 000000000000..4621bc89d768 --- /dev/null +++ b/specification/communitytraining/Community.Management/main.tsp @@ -0,0 +1,141 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-providerhub"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager; + +@armProviderNamespace("Microsoft.Community") +@service({ + title: "Microsoft.Community", + version: "2023-11-01", +}) +@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) +namespace Microsoft.Community; + +interface Operations extends Azure.ResourceManager.Operations {} + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars" "Existing Template" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars" "Existing template" +@doc("A CommunityProviderHub resource") +model CommunityTraining is TrackedResource { + @doc("The name of the Community Training Resource") + @pattern("^[a-zA-Z0-9-]{3,24}$") + @key("communityTrainingName") + @segment("communityTrainings") + @path + name: string; + + ...ResourceSku; +} + +@doc("The status of the current operation.") +@Azure.Core.lroStatus +enum ProvisioningState { + ...ResourceProvisioningState, + + @doc("Initial provisioning in progress") + Provisioning, + + @doc("Update in progress") + Updating, + + @doc("Deletion in progress") + Deleting, + + @doc("Change accepted for processing") + Accepted, +} + +@doc("Details of the Community CommunityTraining Identity Configuration") +model IdentityConfigurationProperties { + @visibility("read", "create", "update") + @doc("The identity type of the Community Training Resource") + identityType: string; + + @visibility("read", "create", "update") + @doc("To indicate whether the Community Training Resource has Teams enabled") + teamsEnabled?: boolean = false; + + @visibility("read", "create", "update") + @doc("The tenantId of the selected identity provider for the Community Training Resource") + tenantId: string; + + @visibility("read", "create", "update") + @doc("The domain name of the selected identity provider for the Community Training Resource") + domainName: string; + + @visibility("read", "create", "update") + @doc("The clientId of the application registered in the selected identity provider for the Community Training Resource") + clientId: string; + + @visibility("read", "create", "update") + @doc("The client secret of the application registered in the selected identity provider for the Community Training Resource") + @secret + clientSecret: string; + + @visibility("read", "create", "update") + @doc("The name of the authentication policy registered in ADB2C for the Community Training Resource") + b2cAuthenticationPolicy?: string; + + @visibility("read", "create", "update") + @doc("The name of the password reset policy registered in ADB2C for the Community Training Resource") + b2cPasswordResetPolicy?: string; + + @visibility("read", "create", "update") + @doc("The custom login parameters for the Community Training Resource") + customLoginParameters?: string; +} + +@doc("Details of the Community CommunityTraining.") +model CommunityTrainingProperties { + @visibility("read", "create") + @doc("The portal name (website name) of the Community Training instance") + portalName: string; + + @visibility("read", "create") + @doc("The email address of the portal admin") + portalAdminEmailAddress: string; + + @visibility("read", "create") + @doc("The organization name of the portal owner") + portalOwnerOrganizationName: string; + + @visibility("read", "create") + @doc("The email address of the portal owner. Will be used as the primary contact") + portalOwnerEmailAddress: string; + + @visibility("read", "create", "update") + @doc("The identity configuration of the Community Training resource") + identityConfiguration: IdentityConfigurationProperties; + + @visibility("read", "create") + @doc("To indicate whether the Community Training instance has Zone Redundancy enabled") + zoneRedundancyEnabled: boolean; + + @visibility("read", "create") + @doc("To indicate whether the Community Training instance has Disaster Recovery enabled") + disasterRecoveryEnabled: boolean; + + @visibility("read") + @doc("The status of the last operation.") + provisioningState?: ProvisioningState; +} + +@armResourceOperations +interface CommunityTrainings { + get is ArmResourceRead; + create is ArmResourceCreateOrUpdateAsync; + update is ArmResourcePatchAsync< + CommunityTraining, + CommunityTrainingProperties + >; + delete is ArmResourceDeleteAsync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; +} diff --git a/specification/communitytraining/Community.Management/tspconfig.yaml b/specification/communitytraining/Community.Management/tspconfig.yaml new file mode 100644 index 000000000000..a4d7fa87ac1e --- /dev/null +++ b/specification/communitytraining/Community.Management/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - '@azure-tools/typespec-autorest' +options: + '@azure-tools/typespec-autorest': + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/CommunityTrainings.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" \ No newline at end of file diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/CommunityTrainings.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/CommunityTrainings.json new file mode 100644 index 000000000000..4b3240c0e379 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/CommunityTrainings.json @@ -0,0 +1,822 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.Community", + "version": "2023-11-01", + "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": "CommunityTrainings" + } + ], + "paths": { + "/providers/Microsoft.Community/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListOperations": { + "$ref": "./examples/Operations_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Community/communityTrainings": { + "get": { + "operationId": "CommunityTrainings_ListBySubscription", + "tags": [ + "CommunityTrainings" + ], + "description": "List CommunityTraining resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunityTrainingListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListBySubscriptionCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Community/communityTrainings": { + "get": { + "operationId": "CommunityTrainings_ListByResourceGroup", + "tags": [ + "CommunityTrainings" + ], + "description": "List CommunityTraining resources by resource group", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunityTrainingListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListByResourceGroupCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Community/communityTrainings/{communityTrainingName}": { + "get": { + "operationId": "CommunityTrainings_Get", + "tags": [ + "CommunityTrainings" + ], + "description": "Get a CommunityTraining", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "communityTrainingName", + "in": "path", + "description": "The name of the Community Training Resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunityTraining" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_Get.json" + } + } + }, + "put": { + "operationId": "CommunityTrainings_Create", + "tags": [ + "CommunityTrainings" + ], + "description": "Create a CommunityTraining", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "communityTrainingName", + "in": "path", + "description": "The name of the Community Training Resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/CommunityTraining" + } + } + ], + "responses": { + "200": { + "description": "Resource 'CommunityTraining' update operation succeeded", + "schema": { + "$ref": "#/definitions/CommunityTraining" + } + }, + "201": { + "description": "Resource 'CommunityTraining' create operation succeeded", + "schema": { + "$ref": "#/definitions/CommunityTraining" + }, + "headers": { + "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/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_Create.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "CommunityTrainings_Update", + "tags": [ + "CommunityTrainings" + ], + "description": "Update a CommunityTraining", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "communityTrainingName", + "in": "path", + "description": "The name of the Community Training Resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/CommunityTrainingUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/CommunityTraining" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "CommunityTrainings_Delete", + "tags": [ + "CommunityTrainings" + ], + "description": "Delete a CommunityTraining", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "communityTrainingName", + "in": "path", + "description": "The name of the Community Training Resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteCommunityTrainings": { + "$ref": "./examples/CommunityTrainings_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "CommunityTraining": { + "type": "object", + "description": "A CommunityProviderHub resource", + "properties": { + "properties": { + "$ref": "#/definitions/CommunityTrainingProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "sku": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Sku", + "description": "The SKU (Stock Keeping Unit) assigned to this resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "CommunityTrainingListResult": { + "type": "object", + "description": "The response of a CommunityTraining list operation.", + "properties": { + "value": { + "type": "array", + "description": "The CommunityTraining items on this page", + "items": { + "$ref": "#/definitions/CommunityTraining" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "CommunityTrainingProperties": { + "type": "object", + "description": "Details of the Community CommunityTraining.", + "properties": { + "portalName": { + "type": "string", + "description": "The portal name (website name) of the Community Training instance", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "portalAdminEmailAddress": { + "type": "string", + "description": "The email address of the portal admin", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "portalOwnerOrganizationName": { + "type": "string", + "description": "The organization name of the portal owner", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "portalOwnerEmailAddress": { + "type": "string", + "description": "The email address of the portal owner. Will be used as the primary contact", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "identityConfiguration": { + "$ref": "#/definitions/IdentityConfigurationProperties", + "description": "The identity configuration of the Community Training resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "zoneRedundancyEnabled": { + "type": "boolean", + "description": "To indicate whether the Community Training instance has Zone Redundancy enabled", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "disasterRecoveryEnabled": { + "type": "boolean", + "description": "To indicate whether the Community Training instance has Disaster Recovery enabled", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + }, + "required": [ + "portalName", + "portalAdminEmailAddress", + "portalOwnerOrganizationName", + "portalOwnerEmailAddress", + "identityConfiguration", + "zoneRedundancyEnabled", + "disasterRecoveryEnabled" + ] + }, + "CommunityTrainingUpdate": { + "type": "object", + "description": "The type used for update operations of the CommunityTraining.", + "properties": { + "sku": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Sku", + "description": "The SKU (Stock Keeping Unit) assigned to this resource." + }, + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/CommunityTrainingUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "CommunityTrainingUpdateProperties": { + "type": "object", + "description": "The updatable properties of the CommunityTraining.", + "properties": { + "identityConfiguration": { + "$ref": "#/definitions/IdentityConfigurationPropertiesUpdate", + "description": "The identity configuration of the Community Training resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + } + }, + "IdentityConfigurationProperties": { + "type": "object", + "description": "Details of the Community CommunityTraining Identity Configuration", + "properties": { + "identityType": { + "type": "string", + "description": "The identity type of the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "teamsEnabled": { + "type": "boolean", + "description": "To indicate whether the Community Training Resource has Teams enabled", + "default": false, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "domainName": { + "type": "string", + "description": "The domain name of the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "clientId": { + "type": "string", + "description": "The clientId of the application registered in the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "clientSecret": { + "type": "string", + "format": "password", + "description": "The client secret of the application registered in the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ], + "x-ms-secret": true + }, + "b2cAuthenticationPolicy": { + "type": "string", + "description": "The name of the authentication policy registered in ADB2C for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "b2cPasswordResetPolicy": { + "type": "string", + "description": "The name of the password reset policy registered in ADB2C for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "customLoginParameters": { + "type": "string", + "description": "The custom login parameters for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + }, + "required": [ + "identityType", + "tenantId", + "domainName", + "clientId", + "clientSecret" + ] + }, + "IdentityConfigurationPropertiesUpdate": { + "type": "object", + "description": "Details of the Community CommunityTraining Identity Configuration", + "properties": { + "identityType": { + "type": "string", + "description": "The identity type of the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "teamsEnabled": { + "type": "boolean", + "description": "To indicate whether the Community Training Resource has Teams enabled", + "default": false, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "tenantId": { + "type": "string", + "description": "The tenantId of the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "domainName": { + "type": "string", + "description": "The domain name of the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "clientId": { + "type": "string", + "description": "The clientId of the application registered in the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "clientSecret": { + "type": "string", + "format": "password", + "description": "The client secret of the application registered in the selected identity provider for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ], + "x-ms-secret": true + }, + "b2cAuthenticationPolicy": { + "type": "string", + "description": "The name of the authentication policy registered in ADB2C for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "b2cPasswordResetPolicy": { + "type": "string", + "description": "The name of the password reset policy registered in ADB2C for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "customLoginParameters": { + "type": "string", + "description": "The custom login parameters for the Community Training Resource", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + } + }, + "ProvisioningState": { + "type": "string", + "description": "The status of the current operation.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "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": "Initial provisioning in progress" + }, + { + "name": "Updating", + "value": "Updating", + "description": "Update in progress" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Deletion in progress" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Change accepted for processing" + } + ] + } + } + }, + "parameters": {} +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json deleted file mode 100644 index 7ed4ca107ca3..000000000000 --- a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/communitytraining.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2023-11-01", - "title": "communitytraining", - "description": "Description of the new service", - "x-ms-code-generation-settings": { - "name": "communitytrainingClient" - } - }, - "host": "management.azure.com", - "schemes": ["https"], - "consumes": ["application/json"], - "produces": ["application/json"], - "security": [ - { - "azure_auth": ["user_impersonation"] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Community/operations": { - "get": { - "tags": ["Tag1"], - "operationId": "OperationGroup_Get", - "x-ms-examples": { - "BatchAccountDelete": { "$ref": "./examples/OperationGroupGet.json" } - }, - "description": "This is a sample get operation, please see guidelines in azure-rest-api-specs repository for more info", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - } - ], - "responses": { - "200": { - "description": "Describe the result of a successful operation.", - "schema": { - "$ref": "#/definitions/Result" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "Result": { - "description": "Sample result definition", - "properties": { - "sampleProperty": { - "type": "string", - "description": "Sample property of type string" - } - } - }, - "ErrorResponse": { - "description": "Error response.", - "properties": { - "error": { - "$ref": "#/definitions/ErrorDefinition", - "description": "The error details." - } - } - }, - "ErrorDefinition": { - "description": "Error definition.", - "properties": { - "code": { - "description": "Service specific error code which serves as the substatus for the HTTP error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "Description of the error.", - "type": "string", - "readOnly": true - }, - "details": { - "description": "Internal error details.", - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDefinition" - }, - "readOnly": true - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to be used with the HTTP request." - } - } -} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Create.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Create.json new file mode 100644 index 000000000000..a12898004aa9 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Create.json @@ -0,0 +1,121 @@ +{ + "title": "CreateCommunityTrainings", + "operationId": "CommunityTrainings_Create", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTaining", + "communityTrainingName": "ctApplication", + "resource": { + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "clientSecret": "idenityConfigurationClientSecret", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "location": "southeastasia" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Delete.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Delete.json new file mode 100644 index 000000000000..dc31b3f999f4 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Delete.json @@ -0,0 +1,19 @@ +{ + "title": "DeleteCommunityTrainings", + "operationId": "CommunityTrainings_Delete", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + } + }, + "204": {} + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Get.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Get.json new file mode 100644 index 000000000000..c06816dd6567 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Get.json @@ -0,0 +1,52 @@ +{ + "title": "GetCommunityTrainings", + "operationId": "CommunityTrainings_Get", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListByResourceGroup.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListByResourceGroup.json new file mode 100644 index 000000000000..a15881ee15a3 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListByResourceGroup.json @@ -0,0 +1,55 @@ +{ + "title": "ListByResourceGroupCommunityTrainings", + "operationId": "CommunityTrainings_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + ] + } + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListBySubscription.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListBySubscription.json new file mode 100644 index 000000000000..9451b4a15b10 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_ListBySubscription.json @@ -0,0 +1,54 @@ +{ + "title": "ListBySubscriptionCommunityTrainings", + "operationId": "CommunityTrainings_ListBySubscription", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + ] + } + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Update.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Update.json new file mode 100644 index 000000000000..719130dbc882 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/CommunityTrainings_Update.json @@ -0,0 +1,77 @@ +{ + "title": "UpdateCommunityTrainings", + "operationId": "CommunityTrainings_Update", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgCommunityTraining", + "communityTrainingName": "ctApplication", + "properties": { + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "properties": { + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "clientSecret": "idenityConfigurationClientSecret", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgCommunityTraining/providers/Microsoft.Community/communityTrainings/ctApplication", + "name": "ctApplication", + "type": "Microsoft.Community/communityTrainings", + "properties": { + "portalName": "ctwebsite", + "portalAdminEmailAddress": "ctadmin@ct.com", + "portalOwnerOrganizationName": "CT Portal Owner Organization", + "portalOwnerEmailAddress": "ctcontact@ct.com", + "identityConfiguration": { + "identityType": "ADB2C", + "teamsEnabled": false, + "tenantId": "c1ffbb60-88cf-4b83-b54f-c47ae6220c19", + "domainName": "cttenant", + "clientId": "8c92390f-2f30-493d-bd13-d3c3eba3709d", + "b2cAuthenticationPolicy": "B2C_1_signup_signin", + "b2cPasswordResetPolicy": "B2C_1_pwd_reset", + "customLoginParameters": "custom_hint" + }, + "zoneRedundancyEnabled": true, + "disasterRecoveryEnabled": true, + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Commercial", + "tier": "Standard" + }, + "tags": {}, + "location": "southeastasia", + "systemData": { + "createdBy": "ctowner@ct.com", + "createdByType": "User", + "createdAt": "2023-08-01T11:42:44.657Z", + "lastModifiedBy": "ctowner@ct.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-08-01T11:42:44.657Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Community/locations/southeastasia/operationStatuses/a9d7605b-20d2-44c9-bdaf-65d981f30403?api-version=2023-11-01" + } + } + } +} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json deleted file mode 100644 index f65c464f8e23..000000000000 --- a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/OperationGroupGet.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "accountName": "sampleacct", - "resourceGroupName": "communitytrainingClient", - "api-version": "2023-11-01", - "subscriptionId": "subid" - }, - "responses": { - "200": { - "body": { - "sampleProperty": "sampleProperty" - } - } - } -} diff --git a/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/Operations_List.json b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/Operations_List.json new file mode 100644 index 000000000000..b22bf1f25795 --- /dev/null +++ b/specification/communitytraining/resource-manager/Microsoft.Community/stable/2023-11-01/examples/Operations_List.json @@ -0,0 +1,75 @@ +{ + "title": "ListOperations", + "operationId": "Operations_List", + "parameters": { + "api-version": "2023-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "display": { + "description": "List CommunityTrainings Resource resources by subscription ID", + "operation": "CommunityTrainings_ListBySubscription", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "List CommunityTrainings Resource resources by resource group", + "operation": "CommunityTrainings_ListByResourceGroup", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "Get a CommunityTrainings Resource", + "operation": "CommunityTrainings_Get", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/read" + }, + { + "display": { + "description": "Create a CommunityTrainings Resource", + "operation": "CommunityTrainings_Create", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/write" + }, + { + "display": { + "description": "Delete a CommunityTraining Resource", + "operation": "CommunityTrainings_Delete", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/delete" + }, + { + "display": { + "description": "Update a CommunityTrainings Resource", + "operation": "CommunityTrainings_Update", + "provider": "Microsoft.Community", + "resource": "communityTrainings" + }, + "isDataAction": false, + "name": "Microsoft.Community/communityTrainings/write" + } + ] + } + } + } +} diff --git a/specification/communitytraining/resource-manager/readme.md b/specification/communitytraining/resource-manager/readme.md index e670711f1ce3..02973703598a 100644 --- a/specification/communitytraining/resource-manager/readme.md +++ b/specification/communitytraining/resource-manager/readme.md @@ -26,6 +26,7 @@ These are the global settings for the communitytraining. ```yaml openapi-type: arm +openapi-subtype: rpaas tag: package-2023-11-01 ``` @@ -35,7 +36,7 @@ These settings apply only when `--tag=package-2023-11-01` is specified on the co ```yaml $(tag) == 'package-2023-11-01' input-file: - - Microsoft.Community/stable/2023-11-01/communitytraining.json + - Microsoft.Community/stable/2023-11-01/CommunityTrainings.json ``` ---