diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builders.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builders.json new file mode 100644 index 000000000000..3cedd65bbffc --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builders.json @@ -0,0 +1,501 @@ +{ + "swagger": "2.0", + "info": { + "title": "ContainerApps API Client", + "version": "2023-05-02-preview" + }, + "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" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders": { + "get": { + "tags": [ + "Builders" + ], + "operationId": "Builders_ListBySubscription", + "description": "List BuilderResource 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/BuilderCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Builders_ListBySubscription_0": { + "$ref": "./examples/Builders_ListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders": { + "get": { + "tags": [ + "Builders" + ], + "operationId": "Builders_ListByResourceGroup", + "description": "List BuilderResource 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/BuilderCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Builders_ListByResourceGroup_0": { + "$ref": "./examples/Builders_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}": { + "get": { + "tags": [ + "Builders" + ], + "operationId": "Builders_Get", + "description": "Get a BuilderResource", + "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" + }, + { + "$ref": "#/parameters/BuilderNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuilderResource" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Builders_Get_0": { + "$ref": "./examples/Builders_Get.json" + } + } + }, + "put": { + "tags": [ + "Builders" + ], + "operationId": "Builders_CreateOrUpdate", + "description": "Create or update a BuilderResource", + "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" + }, + { + "$ref": "#/parameters/BuilderNameParameter" + }, + { + "name": "builderEnvelope", + "in": "body", + "required": true, + "description": "Resource create parameters.", + "schema": { + "$ref": "#/definitions/BuilderResource" + } + } + ], + "responses": { + "200": { + "description": "ARM create or update operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuilderResource" + } + }, + "201": { + "description": "ARM create or update operation has been started.", + "schema": { + "$ref": "#/definitions/BuilderResource" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Builders_CreateOrUpdate_0": { + "$ref": "./examples/Builders_CreateOrUpdate.json" + } + } + }, + "patch": { + "tags": [ + "Builders" + ], + "operationId": "Builders_Update", + "description": "Update a BuilderResource", + "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" + }, + { + "$ref": "#/parameters/BuilderNameParameter" + }, + { + "name": "builderEnvelope", + "in": "body", + "required": true, + "description": "The resource properties to be updated.", + "schema": { + "$ref": "#/definitions/BuilderResourceUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuilderResource" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Builders_Update_0": { + "$ref": "./examples/Builders_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Builders" + ], + "operationId": "Builders_Delete", + "description": "Delete a BuilderResource", + "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" + }, + { + "$ref": "#/parameters/BuilderNameParameter" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Builders_Delete_0": { + "$ref": "./examples/Builders_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "BuilderProperties": { + "type": "object", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of a builder resource.", + "readOnly": true + }, + "environmentId": { + "type": "string", + "description": "Resource ID of the container apps environment that the builder is associated with." + }, + "buildComputeId": { + "type": "string", + "description": "Resource ID of the compute that the builds will be performed on.", + "readOnly": true + }, + "patchComputeId": { + "type": "string", + "description": "Resource ID of the compute that the patching will be performed on.", + "readOnly": true + }, + "containerRegistries": { + "type": "array", + "items": { + "$ref": "#/definitions/ContainerRegistry" + }, + "x-ms-identifiers": [ + "containerRegistryServer" + ], + "description": "List of mappings of container registries and the managed identity used to connect to it." + } + }, + "description": "The builder properties.", + "required": [ + "environmentId" + ] + }, + "BuilderResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/BuilderProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "identity": { + "$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity", + "description": "The managed service identities assigned to this resource." + } + }, + "description": "Information about the SourceToCloud builder resource.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "BuilderCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/BuilderResource" + }, + "description": "The BuilderResource items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "The response of a BuilderResource list operation.", + "required": [ + "value" + ] + }, + "BuilderResourceUpdate": { + "type": "object", + "properties": { + "identity": { + "$ref": "../../../../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity", + "description": "The managed service identities assigned to this resource." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + }, + "properties": { + "$ref": "#/definitions/BuilderResourceUpdateProperties", + "x-ms-client-flatten": true + } + }, + "description": "The type used for update operations of the BuilderResource." + }, + "BuilderResourceUpdateProperties": { + "type": "object", + "properties": { + "environmentId": { + "type": "string", + "description": "Resource ID of the container apps environment that the builder is associated with." + } + }, + "description": "The updatable properties of the BuilderResource." + }, + "ContainerRegistry": { + "type": "object", + "properties": { + "containerRegistryServer": { + "type": "string", + "description": "Login server of the container registry." + }, + "identityResourceId": { + "type": "string", + "description": "Resource ID of the managed identity." + } + }, + "description": "Model representing a mapping from a container registry to the identity used to connect to it.", + "required": [ + "containerRegistryServer", + "identityResourceId" + ] + }, + "ProvisioningState": { + "type": "string", + "description": "Resource instance provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Updating", + "Deleting" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + } + }, + "parameters": { + "BuilderNameParameter": { + "name": "builderName", + "in": "path", + "required": true, + "description": "The name of the builder.", + "minLength": 2, + "maxLength": 32, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builds.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builds.json new file mode 100644 index 000000000000..b2a03304c7c2 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/Builds.json @@ -0,0 +1,486 @@ +{ + "swagger": "2.0", + "info": { + "title": "ContainerApps API Client", + "version": "2023-05-02-preview" + }, + "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" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds": { + "get": { + "tags": [ + "Builds" + ], + "operationId": "Builds_ListByBuilderResource", + "description": "List BuildResource resources by BuilderResource", + "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" + }, + { + "$ref": "./Builders.json#/parameters/BuilderNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuildCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Builds_ListByBuilderResource_0": { + "$ref": "./examples/Builds_ListByBuilderResource.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}": { + "get": { + "tags": [ + "Builds" + ], + "operationId": "Builds_Get", + "description": "Get a BuildResource", + "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" + }, + { + "$ref": "./Builders.json#/parameters/BuilderNameParameter" + }, + { + "$ref": "#/parameters/BuildNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuildResource" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Builds_Get_0": { + "$ref": "./examples/Builds_Get.json" + } + } + }, + "put": { + "tags": [ + "Builds" + ], + "operationId": "Builds_CreateOrUpdate", + "description": "Create a BuildResource", + "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" + }, + { + "$ref": "./Builders.json#/parameters/BuilderNameParameter" + }, + { + "$ref": "#/parameters/BuildNameParameter" + }, + { + "name": "buildEnvelope", + "in": "body", + "required": true, + "description": "Resource create or update parameters.", + "schema": { + "$ref": "#/definitions/BuildResource" + } + } + ], + "responses": { + "200": { + "description": "ARM create or update operation completed successfully.", + "schema": { + "$ref": "#/definitions/BuildResource" + } + }, + "201": { + "description": "ARM create or update operation has been started.", + "schema": { + "$ref": "#/definitions/BuildResource" + }, + "headers": { + "Azure-AsyncOperation": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Builds_CreateOrUpdate_WithConfig": { + "$ref": "./examples/Builds_CreateOrUpdate.json" + }, + "Builds_CreateOrUpdate_NoConfig": { + "$ref": "./examples/Builds_CreateOrUpdate_NoConfig.json" + } + } + }, + "delete": { + "tags": [ + "Builds" + ], + "operationId": "Builds_Delete", + "description": "Delete a BuildResource", + "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" + }, + { + "$ref": "./Builders.json#/parameters/BuilderNameParameter" + }, + { + "$ref": "#/parameters/BuildNameParameter" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Builds_Delete_0": { + "$ref": "./examples/Builds_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "BuildConfiguration": { + "type": "object", + "properties": { + "baseOs": { + "type": "string", + "description": "Base OS used to build and run the app." + }, + "platform": { + "type": "string", + "description": "Platform to be used to build and run the app." + }, + "platformVersion": { + "type": "string", + "description": "Platform version to be used to build and run the app." + }, + "environmentVariables": { + "type": "array", + "items": { + "$ref": "#/definitions/EnvironmentVariable" + }, + "x-ms-identifiers": [ + "name" + ], + "description": "List of environment variables to be passed to the build and application runtime." + }, + "preBuildSteps": { + "type": "array", + "items": { + "$ref": "#/definitions/PreBuildStep" + }, + "x-ms-identifiers": [], + "description": "List of steps to perform before the build." + } + }, + "description": "Configuration of the build." + }, + "BuildProperties": { + "type": "object", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Build provisioning state.", + "readOnly": true + }, + "buildStatus": { + "$ref": "#/definitions/BuildStatus", + "description": "Status of the build once it has been provisioned.", + "readOnly": true + }, + "destinationContainerRegistry": { + "$ref": "#/definitions/ContainerRegistryWithCustomImage", + "description": "Container registry that the final image will be uploaded to." + }, + "configuration": { + "$ref": "#/definitions/BuildConfiguration", + "description": "Configuration of the build." + }, + "uploadEndpoint": { + "type": "string", + "description": "Endpoint to which the source code should be uploaded.", + "readOnly": true + } + }, + "description": "The build properties." + }, + "BuildResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/BuildProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "description": "Information pertaining to an individual build.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "BuildCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/BuildResource" + }, + "description": "The BuildResource items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "The response of a BuildResource list operation.", + "required": [ + "value" + ] + }, + "BuildStatus": { + "type": "string", + "description": "Status of the build once it has been provisioned.", + "enum": [ + "NotStarted", + "InProgress", + "Succeeded", + "Canceled", + "Failed" + ], + "x-ms-enum": { + "name": "BuildStatus", + "modelAsString": true + } + }, + "ContainerRegistryWithCustomImage": { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "Login server of the container registry that the final image should be uploaded to. Builder resource needs to have this container registry defined along with an identity to use to access it." + }, + "image": { + "type": "string", + "description": "Full name that the final image should be uploaded as, including both image name and tag." + } + }, + "description": "Container registry that the final image will be uploaded to.", + "required": [ + "server" + ] + }, + "EnvironmentVariable": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Environment variable name." + }, + "value": { + "type": "string", + "description": "Environment variable value." + } + }, + "description": "Model representing an environment variable.", + "required": [ + "name", + "value" + ] + }, + "HttpGet": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to make HTTP GET request against." + }, + "fileName": { + "type": "string", + "description": "Name of the file that the request should be saved to." + }, + "headers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of headers to send with the request." + } + }, + "description": "Model representing a http get request.", + "required": [ + "url" + ] + }, + "PreBuildStep": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the pre-build step." + }, + "scripts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of custom commands to run." + }, + "httpGet": { + "$ref": "#/definitions/HttpGet", + "description": "Http get request to send before the build.", + "x-ms-identifiers": [] + } + }, + "description": "Model representing a pre-build step." + }, + "ProvisioningState": { + "type": "string", + "description": "Resource instance provisioning state.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Updating", + "Deleting" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + } + }, + "parameters": { + "BuildNameParameter": { + "name": "buildName", + "in": "path", + "required": true, + "description": "The name of a build.", + "minLength": 2, + "maxLength": 64, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_CreateOrUpdate.json new file mode 100644 index 000000000000..ffe6262d417b --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_CreateOrUpdate.json @@ -0,0 +1,132 @@ +{ + "operationId": "Builders_CreateOrUpdate", + "title": "Builders_CreateOrUpdate_0", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "api-version": "2023-05-02-preview", + "builderEnvelope": { + "identity": { + "type": "SystemAssigned,UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} + } + }, + "properties": { + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "tags": { + "company": "Microsoft" + }, + "location": "eastus" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder", + "name": "testBuilder", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "company": "Microsoft" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder", + "name": "testBuilder", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Creating", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "company": "Microsoft" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Delete.json new file mode 100644 index 000000000000..2d037d75af43 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "Builders_Delete", + "title": "Builders_Delete_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + } + }, + "204": {} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Get.json new file mode 100644 index 000000000000..345984537260 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Get.json @@ -0,0 +1,58 @@ +{ + "operationId": "Builders_Get", + "title": "Builders_Get_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder", + "name": "testBuilder", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "key": "value" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListByResourceGroup.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListByResourceGroup.json new file mode 100644 index 000000000000..5604ec09b848 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListByResourceGroup.json @@ -0,0 +1,106 @@ +{ + "operationId": "Builders_ListByResourceGroup", + "title": "Builders_ListByResourceGroup_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder1", + "name": "testBuilder1", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "key": "value" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder2", + "name": "testBuilder2", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "key": "value" + } + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListBySubscription.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListBySubscription.json new file mode 100644 index 000000000000..b09dd74b2890 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_ListBySubscription.json @@ -0,0 +1,105 @@ +{ + "operationId": "Builders_ListBySubscription", + "title": "Builders_ListBySubscription_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.App/builders/testBuilder1", + "name": "testBuilder1", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "key": "value" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg2/providers/Microsoft.App/builders/testBuilder2", + "name": "testBuilder2", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "key": "value" + } + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Update.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Update.json new file mode 100644 index 000000000000..ad441a417b37 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builders_Update.json @@ -0,0 +1,68 @@ +{ + "operationId": "Builders_Update", + "title": "Builders_Update_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "builderEnvelope": { + "tags": { + "mytag1": "myvalue1" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder", + "name": "testBuilder", + "type": "Microsoft.App/builders", + "location": "eastus", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "provisioningState": "Succeeded", + "environmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv", + "buildComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/build1234", + "patchComputeId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/jobs/patcher1234", + "containerRegistries": [ + { + "containerRegistryServer": "test.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + }, + { + "containerRegistryServer": "test2.azurecr.io", + "identityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" + } + ] + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + }, + "tags": { + "mytag1": "myvalue1" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate.json new file mode 100644 index 000000000000..8b631e638af9 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate.json @@ -0,0 +1,210 @@ +{ + "operationId": "Builds_CreateOrUpdate", + "title": "Builds_CreateOrUpdate_WithConfig", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild-123456789az", + "api-version": "2023-05-02-preview", + "buildEnvelope": { + "properties": { + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild-123456789az", + "name": "testBuild-123456789az", + "type": "Microsoft.App/builders/builds", + "properties": { + "provisioningState": "Succeeded", + "buildStatus": "InProgress", + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + }, + "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild", + "name": "testBuild", + "type": "Microsoft.App/build", + "properties": { + "provisioningState": "Creating", + "buildStatus": "NotStarted", + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + }, + "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json new file mode 100644 index 000000000000..4a9d08b11268 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json @@ -0,0 +1,57 @@ +{ + "operationId": "Builds_CreateOrUpdate", + "title": "Builds_CreateOrUpdate_NoConfig", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild", + "api-version": "2023-05-02-preview", + "buildEnvelope": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild", + "name": "testBuild", + "type": "Microsoft.App/builders/builds", + "properties": { + "provisioningState": "Succeeded", + "buildStatus": "InProgress", + "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild", + "name": "testBuild", + "type": "Microsoft.App/build", + "properties": { + "provisioningState": "Creating", + "buildStatus": "InProgress", + "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Delete.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Delete.json new file mode 100644 index 000000000000..12fa3dfd99a2 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Delete.json @@ -0,0 +1,20 @@ +{ + "operationId": "Builds_Delete", + "title": "Builds_Delete_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}" + } + }, + "204": {} + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Get.json new file mode 100644 index 000000000000..b141c3463d47 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_Get.json @@ -0,0 +1,83 @@ +{ + "operationId": "Builds_Get", + "title": "Builds_Get_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild", + "name": "testBuild", + "type": "Microsoft.App/builders/builds", + "properties": { + "provisioningState": "Succeeded", + "buildStatus": "InProgress", + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + }, + "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_ListByBuilderResource.json b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_ListByBuilderResource.json new file mode 100644 index 000000000000..86d1f2ae402d --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-05-02-preview/examples/Builds_ListByBuilderResource.json @@ -0,0 +1,155 @@ +{ + "operationId": "Builds_ListByBuilderResource", + "title": "Builds_ListByBuilderResource_0", + "parameters": { + "api-version": "2023-05-02-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild1", + "name": "testBuild1", + "type": "Microsoft.App/builders/builds", + "properties": { + "provisioningState": "Succeeded", + "buildStatus": "InProgress", + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + }, + "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild2", + "name": "testBuild2", + "type": "Microsoft.App/builders/builds", + "properties": { + "provisioningState": "Succeeded", + "buildStatus": "InProgress", + "destinationContainerRegistry": { + "server": "test.azurecr.io", + "image": "test.azurecr.io/repo:tag" + }, + "configuration": { + "baseOs": "DebianBullseye", + "platform": "dotnetcore", + "platformVersion": "7.0", + "environmentVariables": [ + { + "name": "foo1", + "value": "bar1" + }, + { + "name": "foo2", + "value": "bar2" + } + ], + "preBuildSteps": [ + { + "description": "First pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'world'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo", + "bar" + ] + } + }, + { + "description": "Second pre build step.", + "scripts": [ + "echo 'hello'", + "echo 'again'" + ], + "httpGet": { + "url": "https://microsoft.com", + "fileName": "output.txt", + "headers": [ + "foo" + ] + } + } + ] + }, + "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + }, + "systemData": { + "createdBy": "sample@microsoft.com", + "createdByType": "User", + "createdAt": "2022-10-11T11:05:51.4940669Z", + "lastModifiedBy": "sample@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-10-11T11:05:51.4940669Z" + } + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/readme.md b/specification/app/resource-manager/readme.md index c2dbb6d3017e..9c52069b49e8 100644 --- a/specification/app/resource-manager/readme.md +++ b/specification/app/resource-manager/readme.md @@ -39,6 +39,8 @@ input-file: - Microsoft.App/preview/2023-05-02-preview/AuthConfigs.json - Microsoft.App/preview/2023-05-02-preview/AvailableWorkloadProfiles.json - Microsoft.App/preview/2023-05-02-preview/BillingMeters.json + - Microsoft.App/preview/2023-05-02-preview/Builders.json + - Microsoft.App/preview/2023-05-02-preview/Builds.json - Microsoft.App/preview/2023-05-02-preview/CommonDefinitions.json - Microsoft.App/preview/2023-05-02-preview/ConnectedEnvironments.json - Microsoft.App/preview/2023-05-02-preview/ConnectedEnvironmentsCertificates.json @@ -53,6 +55,22 @@ input-file: - Microsoft.App/preview/2023-05-02-preview/ManagedEnvironmentsDaprComponents.json - Microsoft.App/preview/2023-05-02-preview/ManagedEnvironmentsStorages.json - Microsoft.App/preview/2023-05-02-preview/SourceControls.json +directive: + - suppress: OperationIdNounVerb + from: Builds.json + reason: | + The linting thinks that 'Builder' in 'Builds_ListByBuilderResource' is a noun, while it + is really the parent. + - suppress: LroErrorContent + from: Builds.json + reason: | + We are not using the common error response for these new resources to promote consistency + with the rest of the Microsoft.App RP, as it also doesn't use the common-types error. + - suppress: LroErrorContent + from: Builders.json + reason: | + We are not using the common error response for these new resources to promote consistency + with the rest of the Microsoft.App RP, as it also doesn't use the common-types error. ``` ### Tag: package-preview-2023-04