diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/Builds.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/Builds.json index 194399f2981a..43ded0e50cc3 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/Builds.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/Builds.json @@ -247,6 +247,51 @@ }, "x-ms-long-running-operation": true } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken": { + "post": { + "tags": [ + "Builds" + ], + "operationId": "Builds_ListAuthToken", + "description": "Gets the token used to connect to the endpoint where source code can be uploaded for a build.", + "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": "OK", + "schema": { + "$ref": "#/definitions/BuildToken" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Build Auth Token": { + "$ref": "./examples/Builds_ListAuthToken.json" + } + } + } } }, "definitions": { @@ -311,6 +356,16 @@ "type": "string", "description": "Endpoint to which the source code should be uploaded.", "readOnly": true + }, + "logStreamEndpoint": { + "type": "string", + "description": "Endpoint from which the build logs can be streamed.", + "readOnly": true + }, + "tokenEndpoint": { + "type": "string", + "description": "Endpoint to use to retrieve an authentication token for log streaming and uploading source code.", + "readOnly": true } }, "description": "The build properties." @@ -388,6 +443,24 @@ "server" ] }, + "BuildToken": { + "description": "Build Auth Token.", + "type": "object", + "properties": { + "token": { + "type": "string", + "x-ms-secret": true, + "description": "Authentication token.", + "readOnly": true + }, + "expires": { + "format": "date-time", + "description": "Token expiration date.", + "type": "string", + "readOnly": true + } + } + }, "EnvironmentVariable": { "type": "object", "properties": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json index 2184d28e6576..85f15e2fa672 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json @@ -121,7 +121,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -194,7 +196,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json index 36221e2ccd3e..f7fea424d3a0 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json @@ -18,7 +18,9 @@ "properties": { "provisioningState": "Succeeded", "buildStatus": "InProgress", - "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -41,7 +43,9 @@ "properties": { "provisioningState": "Creating", "buildStatus": "InProgress", - "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json index 11b47674a16d..3ef36970c998 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json @@ -67,7 +67,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListAuthToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListAuthToken.json new file mode 100644 index 000000000000..1f7fe5092cc9 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListAuthToken.json @@ -0,0 +1,20 @@ +{ + "operationId": "Builds_ListAuthToken", + "title": "Builds_ListAuthToken_0", + "parameters": { + "api-version": "2023-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "token": "foobartoken", + "expires": "2022-07-14T19:22:50.3080223Z" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json index 0a661a45134b..e7622c718611 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json @@ -69,7 +69,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -137,7 +139,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": "https://foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "https://foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": "https://management.azure.com/subscriptions/{subscription-id}/resourcegroups/{rg-id}/Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com",