From b3131fdf64e37fd8c7df7b6008664d64007c052f Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 21 Sep 2023 15:06:33 -0400 Subject: [PATCH 01/12] updated the build resource to support build upload and log streaming, with a token to be passed in via header --- .../preview/2023-08-01-preview/Builds.json | 24 ++++++++++++++++++- .../examples/Builds_CreateOrUpdate.json | 18 ++++++++++++-- .../Builds_CreateOrUpdate_NoConfig.json | 18 ++++++++++++-- .../examples/Builds_Get.json | 9 ++++++- .../Builds_ListByBuilderResource.json | 18 ++++++++++++-- 5 files changed, 79 insertions(+), 8 deletions(-) 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..a717ceb54619 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 @@ -308,9 +308,14 @@ "description": "Configuration of the build." }, "uploadEndpoint": { - "type": "string", + "$ref": "#/definitions/BuildEndpoint", "description": "Endpoint to which the source code should be uploaded.", "readOnly": true + }, + "logStreamEndpoint": { + "$ref": "#/definitions/BuildEndpoint", + "description": "Endpoint from which the build logs can be streamed.", + "readOnly": true } }, "description": "The build properties." @@ -388,6 +393,23 @@ "server" ] }, + "BuildEndpoint": { + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "description": "Endpoint url." + }, + "token": { + "type": "string", + "description": "Authentication token to be passed to the endpoint via headers." + } + }, + "description": "Endpoint to interact with the build once it has been provisioned.", + "required": [ + "endpoint" + ] + }, "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..746cd4fe9019 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,14 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "systemData": { "createdBy": "sample@microsoft.com", @@ -194,7 +201,14 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "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..9333537a599b 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,14 @@ "properties": { "provisioningState": "Succeeded", "buildStatus": "InProgress", - "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "systemData": { "createdBy": "sample@microsoft.com", @@ -41,7 +48,14 @@ "properties": { "provisioningState": "Creating", "buildStatus": "InProgress", - "uploadEndpoint": "https://testStorage.blob.core.windows.net/buildGUID/blobName" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "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..c04aacf97522 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,14 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "systemData": { "createdBy": "sample@microsoft.com", 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..35b1b51e1dd0 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,14 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "systemData": { "createdBy": "sample@microsoft.com", @@ -137,7 +144,14 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload" + "uploadEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/upload", + "token": "asdf" + }, + "logStreamEndpoint": { + "endpoint": "foo.azurecontainerapps.dev/logstream", + "token": "asdf" + } }, "systemData": { "createdBy": "sample@microsoft.com", From c02b32ace1a60ca4860339de0c7313e7cb3a2b57 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 21 Sep 2023 15:37:08 -0400 Subject: [PATCH 02/12] add x-ms-secret and update buildendpoint -> endpoint --- .../Microsoft.App/preview/2023-08-01-preview/Builds.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 a717ceb54619..826ef40cb3f1 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 @@ -308,12 +308,12 @@ "description": "Configuration of the build." }, "uploadEndpoint": { - "$ref": "#/definitions/BuildEndpoint", + "$ref": "#/definitions/Endpoint", "description": "Endpoint to which the source code should be uploaded.", "readOnly": true }, "logStreamEndpoint": { - "$ref": "#/definitions/BuildEndpoint", + "$ref": "#/definitions/Endpoint", "description": "Endpoint from which the build logs can be streamed.", "readOnly": true } @@ -393,7 +393,7 @@ "server" ] }, - "BuildEndpoint": { + "Endpoint": { "type": "object", "properties": { "endpoint": { @@ -402,6 +402,7 @@ }, "token": { "type": "string", + "x-ms-secret": true, "description": "Authentication token to be passed to the endpoint via headers." } }, From 85d2311f3442a212ba1018c16c74bd075cff44de Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 21 Sep 2023 17:03:50 -0400 Subject: [PATCH 03/12] retrieve log stream and upload endpoint tokens through post requests, as they are secrets --- .../preview/2023-08-01-preview/Builds.json | 114 +++++++++++++++++- .../examples/Builds_CreateOrUpdate.json | 8 +- .../Builds_CreateOrUpdate_NoConfig.json | 8 +- .../examples/Builds_Get.json | 4 +- ...Builds_GetLogStreamEndpointToken copy.json | 23 ++++ .../Builds_GetUploadEndpointToken.json | 23 ++++ .../Builds_ListByBuilderResource.json | 4 +- 7 files changed, 167 insertions(+), 17 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json 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 826ef40cb3f1..0d8fd34db4c3 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,96 @@ }, "x-ms-long-running-operation": true } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getLogStreamEndpointToken": { + "post": { + "tags": [ + "Builds" + ], + "operationId": "Builds_GetLogStreamEndpointToken", + "description": "Gets the token used to connect to the build log stream endpoint.", + "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/Token" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Build Log Stream Endpoint Token": { + "$ref": "./examples/Builds_GetLogStreamEndpointToken.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getUploadEndpointToken": { + "post": { + "tags": [ + "Builds" + ], + "operationId": "Builds_GetUploadEndpointToken", + "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/Token" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Build Upload Endpoint Token": { + "$ref": "./examples/Builds_GetUploadEndpointToken.json" + } + } + } } }, "definitions": { @@ -308,12 +398,12 @@ "description": "Configuration of the build." }, "uploadEndpoint": { - "$ref": "#/definitions/Endpoint", + "$ref": "#/definitions/EndpointWithTokenLink", "description": "Endpoint to which the source code should be uploaded.", "readOnly": true }, "logStreamEndpoint": { - "$ref": "#/definitions/Endpoint", + "$ref": "#/definitions/EndpointWithTokenLink", "description": "Endpoint from which the build logs can be streamed.", "readOnly": true } @@ -393,17 +483,17 @@ "server" ] }, - "Endpoint": { + "EndpointWithTokenLink": { "type": "object", "properties": { "endpoint": { "type": "string", "description": "Endpoint url." }, - "token": { + "tokenEndpoint": { "type": "string", "x-ms-secret": true, - "description": "Authentication token to be passed to the endpoint via headers." + "description": "Endpoint to use to retrieve an authentication token to be passed to the endpoint via headers." } }, "description": "Endpoint to interact with the build once it has been provisioned.", @@ -411,6 +501,20 @@ "endpoint" ] }, + "Token": { + "type": "object", + "properties": { + "token": { + "type": "string", + "x-ms-secret": true, + "description": "Authentication token." + } + }, + "description": "Authentication token.", + "required": [ + "token" + ] + }, "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 746cd4fe9019..92fcfa9dad8b 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 @@ -123,11 +123,11 @@ }, "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { @@ -203,11 +203,11 @@ }, "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { 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 9333537a599b..bff1e19eeff6 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 @@ -20,11 +20,11 @@ "buildStatus": "InProgress", "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { @@ -50,11 +50,11 @@ "buildStatus": "InProgress", "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { 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 c04aacf97522..621fcd8f566f 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 @@ -69,11 +69,11 @@ }, "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json new file mode 100644 index 000000000000..3445b6e300a9 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json @@ -0,0 +1,23 @@ +{ + "operationId": "Builds_GetLogStreamEndpointToken", + "title": "Builds_GetLogStreamEndpointToken_0", + "parameters": { + "api-version": "2023-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "token": "foobartoken" + } + ] + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json new file mode 100644 index 000000000000..53239c002c78 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json @@ -0,0 +1,23 @@ +{ + "operationId": "Builds_GetUploadEndpointToken", + "title": "Builds_GetUploadEndpointToken_0", + "parameters": { + "api-version": "2023-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg", + "builderName": "testBuilder", + "buildName": "testBuild" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "token": "foobartoken" + } + ] + } + } + } +} 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 35b1b51e1dd0..64ad9a4816f6 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 @@ -71,11 +71,11 @@ }, "uploadEndpoint": { "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" }, "logStreamEndpoint": { "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" } }, "systemData": { From f3c99f9ff10e6bafcb3305a71d066c7932a49686 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 21 Sep 2023 17:05:53 -0400 Subject: [PATCH 04/12] remove secret flag from tokenendpoint property, as we expect users to retrieve it --- .../Microsoft.App/preview/2023-08-01-preview/Builds.json | 1 - 1 file changed, 1 deletion(-) 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 0d8fd34db4c3..93cff3682d26 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 @@ -492,7 +492,6 @@ }, "tokenEndpoint": { "type": "string", - "x-ms-secret": true, "description": "Endpoint to use to retrieve an authentication token to be passed to the endpoint via headers." } }, From 406cc8daed63d6d47a9c5013edc30ab71215902e Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 21 Sep 2023 17:08:25 -0400 Subject: [PATCH 05/12] rename file --- ...pointToken copy.json => Builds_GetLogStreamEndpointToken.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/{Builds_GetLogStreamEndpointToken copy.json => Builds_GetLogStreamEndpointToken.json} (100%) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json similarity index 100% rename from specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken copy.json rename to specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json From 78fe5b063aec259305e3cd438f068590405cd8fd Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Mon, 25 Sep 2023 10:26:25 -0400 Subject: [PATCH 06/12] updated format of how build object returns auth token --- .../preview/2023-08-01-preview/Builds.json | 79 +++---------------- .../examples/Builds_CreateOrUpdate.json | 22 ++---- .../Builds_CreateOrUpdate_NoConfig.json | 22 ++---- .../examples/Builds_Get.json | 11 +-- ...intToken.json => Builds_GetAuthToken.json} | 4 +- .../Builds_GetLogStreamEndpointToken.json | 23 ------ .../Builds_ListByBuilderResource.json | 22 ++---- 7 files changed, 34 insertions(+), 149 deletions(-) rename specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/{Builds_GetUploadEndpointToken.json => Builds_GetAuthToken.json} (80%) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json 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 93cff3682d26..0496c2b88261 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 @@ -248,57 +248,12 @@ "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getLogStreamEndpointToken": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getAuthToken": { "post": { "tags": [ "Builds" ], - "operationId": "Builds_GetLogStreamEndpointToken", - "description": "Gets the token used to connect to the build log stream endpoint.", - "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/Token" - } - }, - "default": { - "description": "Common error response.", - "schema": { - "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-examples": { - "Get Build Log Stream Endpoint Token": { - "$ref": "./examples/Builds_GetLogStreamEndpointToken.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getUploadEndpointToken": { - "post": { - "tags": [ - "Builds" - ], - "operationId": "Builds_GetUploadEndpointToken", + "operationId": "Builds_GetAuthToken", "description": "Gets the token used to connect to the endpoint where source code can be uploaded for a build.", "parameters": [ { @@ -332,8 +287,8 @@ } }, "x-ms-examples": { - "Get Build Upload Endpoint Token": { - "$ref": "./examples/Builds_GetUploadEndpointToken.json" + "Get Build Auth Token": { + "$ref": "./examples/Builds_GetAuthToken.json" } } } @@ -398,14 +353,19 @@ "description": "Configuration of the build." }, "uploadEndpoint": { - "$ref": "#/definitions/EndpointWithTokenLink", + "type": "string", "description": "Endpoint to which the source code should be uploaded.", "readOnly": true }, "logStreamEndpoint": { - "$ref": "#/definitions/EndpointWithTokenLink", + "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." @@ -483,23 +443,6 @@ "server" ] }, - "EndpointWithTokenLink": { - "type": "object", - "properties": { - "endpoint": { - "type": "string", - "description": "Endpoint url." - }, - "tokenEndpoint": { - "type": "string", - "description": "Endpoint to use to retrieve an authentication token to be passed to the endpoint via headers." - } - }, - "description": "Endpoint to interact with the build once it has been provisioned.", - "required": [ - "endpoint" - ] - }, "Token": { "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 92fcfa9dad8b..29577ab00956 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,14 +121,9 @@ } ] }, - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -201,14 +196,9 @@ } ] }, - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "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 bff1e19eeff6..c5385b9a1d7d 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,14 +18,9 @@ "properties": { "provisioningState": "Succeeded", "buildStatus": "InProgress", - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -48,14 +43,9 @@ "properties": { "provisioningState": "Creating", "buildStatus": "InProgress", - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "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 621fcd8f566f..09a56c369828 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,14 +67,9 @@ } ] }, - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json similarity index 80% rename from specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json rename to specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json index 53239c002c78..ce22198c6697 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetUploadEndpointToken.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json @@ -1,6 +1,6 @@ { - "operationId": "Builds_GetUploadEndpointToken", - "title": "Builds_GetUploadEndpointToken_0", + "operationId": "Builds_GetAuthToken", + "title": "Builds_GetAuthToken_0", "parameters": { "api-version": "2023-08-01-preview", "subscriptionId": "00000000-0000-0000-0000-000000000000", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json deleted file mode 100644 index 3445b6e300a9..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetLogStreamEndpointToken.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "operationId": "Builds_GetLogStreamEndpointToken", - "title": "Builds_GetLogStreamEndpointToken_0", - "parameters": { - "api-version": "2023-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "rg", - "builderName": "testBuilder", - "buildName": "testBuild" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "value": [ - { - "token": "foobartoken" - } - ] - } - } - } -} 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 64ad9a4816f6..fd456c66f599 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,14 +69,9 @@ } ] }, - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getUploadEndpointToken" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getLogStreamEndpointToken" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -144,14 +139,9 @@ } ] }, - "uploadEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/upload", - "token": "asdf" - }, - "logStreamEndpoint": { - "endpoint": "foo.azurecontainerapps.dev/logstream", - "token": "asdf" - } + "uploadEndpoint": "foo.azurecontainerapps.dev/upload", + "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", From 635550b9c776f9ff5543699240897f059d29e261 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Mon, 25 Sep 2023 10:37:04 -0400 Subject: [PATCH 07/12] fix example --- .../2023-08-01-preview/examples/Builds_GetAuthToken.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json index ce22198c6697..acbddc1f0d4c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json @@ -12,11 +12,7 @@ "200": { "headers": {}, "body": { - "value": [ - { - "token": "foobartoken" - } - ] + "token": "foobartoken" } } } From a11cf623fd28b4a4a99ffefe9ec9e99279ed803a Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Wed, 27 Sep 2023 10:59:52 -0400 Subject: [PATCH 08/12] added expiration date to token response --- .../preview/2023-08-01-preview/Builds.json | 12 +++++++++--- .../examples/Builds_GetAuthToken.json | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) 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 0496c2b88261..1e647eafc5e3 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 @@ -276,7 +276,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/Token" + "$ref": "#/definitions/BuildToken" } }, "default": { @@ -443,16 +443,22 @@ "server" ] }, - "Token": { + "BuildToken": { "type": "object", "properties": { "token": { "type": "string", "x-ms-secret": true, "description": "Authentication token." + }, + "expires": { + "format": "date-time", + "description": "Token expiration date.", + "type": "string", + "readOnly": true } }, - "description": "Authentication token.", + "description": "Authentication token for connecting to a build resource.", "required": [ "token" ] diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json index acbddc1f0d4c..16d02cc35887 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json @@ -12,7 +12,8 @@ "200": { "headers": {}, "body": { - "token": "foobartoken" + "token": "foobartoken", + "expires": "2022-07-14T19:22:50.3080223Z" } } } From 1cdea5245efa87255d639a8cf93ea4e538a7b1e7 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Wed, 27 Sep 2023 11:07:23 -0400 Subject: [PATCH 09/12] fix auth token to also include build resource information --- .../preview/2023-08-01-preview/Builds.json | 40 ++++++++++++------- .../examples/Builds_GetAuthToken.json | 9 ++++- 2 files changed, 32 insertions(+), 17 deletions(-) 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 1e647eafc5e3..6691a540f483 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 @@ -444,24 +444,34 @@ ] }, "BuildToken": { + "description": "Build Auth Token.", "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ], "properties": { - "token": { - "type": "string", - "x-ms-secret": true, - "description": "Authentication token." - }, - "expires": { - "format": "date-time", - "description": "Token expiration date.", - "type": "string", - "readOnly": true + "properties": { + "description": "Build auth token resource specific properties", + "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 + } + }, + "x-ms-client-flatten": true } - }, - "description": "Authentication token for connecting to a build resource.", - "required": [ - "token" - ] + } }, "EnvironmentVariable": { "type": "object", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json index 16d02cc35887..50bbaf6e1766 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json @@ -12,8 +12,13 @@ "200": { "headers": {}, "body": { - "token": "foobartoken", - "expires": "2022-07-14T19:22:50.3080223Z" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild", + "name": "testBuild", + "type": "Microsoft.App/builders/builds", + "properties": { + "token": "foobartoken", + "expires": "2022-07-14T19:22:50.3080223Z" + } } } } From a717abb4e730e8c83cb5996784248c5496168807 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Thu, 28 Sep 2023 11:28:25 -0400 Subject: [PATCH 10/12] renamed getAuthToken -> listAuthToken and removed resource information from token response --- .../preview/2023-08-01-preview/Builds.json | 40 +++++++------------ .../examples/Builds_GetAuthToken.json | 25 ------------ .../examples/Builds_ListAuthToken.json | 20 ++++++++++ 3 files changed, 34 insertions(+), 51 deletions(-) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListAuthToken.json 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 6691a540f483..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 @@ -248,12 +248,12 @@ "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/getAuthToken": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken": { "post": { "tags": [ "Builds" ], - "operationId": "Builds_GetAuthToken", + "operationId": "Builds_ListAuthToken", "description": "Gets the token used to connect to the endpoint where source code can be uploaded for a build.", "parameters": [ { @@ -288,7 +288,7 @@ }, "x-ms-examples": { "Get Build Auth Token": { - "$ref": "./examples/Builds_GetAuthToken.json" + "$ref": "./examples/Builds_ListAuthToken.json" } } } @@ -446,30 +446,18 @@ "BuildToken": { "description": "Build Auth Token.", "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" - } - ], "properties": { - "properties": { - "description": "Build auth token resource specific properties", - "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 - } - }, - "x-ms-client-flatten": true + "token": { + "type": "string", + "x-ms-secret": true, + "description": "Authentication token.", + "readOnly": true + }, + "expires": { + "format": "date-time", + "description": "Token expiration date.", + "type": "string", + "readOnly": true } } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json deleted file mode 100644 index 50bbaf6e1766..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_GetAuthToken.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "operationId": "Builds_GetAuthToken", - "title": "Builds_GetAuthToken_0", - "parameters": { - "api-version": "2023-08-01-preview", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "resourceGroupName": "rg", - "builderName": "testBuilder", - "buildName": "testBuild" - }, - "responses": { - "200": { - "headers": {}, - "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": { - "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_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" + } + } + } +} From 64f50345731601a2fd21a9b028d9348bd8fc0772 Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Mon, 2 Oct 2023 09:18:27 -0400 Subject: [PATCH 11/12] fix examples --- .../2023-08-01-preview/examples/Builds_CreateOrUpdate.json | 4 ++-- .../examples/Builds_CreateOrUpdate_NoConfig.json | 4 ++-- .../preview/2023-08-01-preview/examples/Builds_Get.json | 2 +- .../examples/Builds_ListByBuilderResource.json | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) 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 29577ab00956..448416bea786 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 @@ -123,7 +123,7 @@ }, "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -198,7 +198,7 @@ }, "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../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 c5385b9a1d7d..38745f1b9c1f 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 @@ -20,7 +20,7 @@ "buildStatus": "InProgress", "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -45,7 +45,7 @@ "buildStatus": "InProgress", "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../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 09a56c369828..d8e710e662cf 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 @@ -69,7 +69,7 @@ }, "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../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_ListByBuilderResource.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json index fd456c66f599..c0da2d4d7602 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 @@ -71,7 +71,7 @@ }, "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", @@ -141,7 +141,7 @@ }, "uploadEndpoint": "foo.azurecontainerapps.dev/upload", "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/getAuthToken" + "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" }, "systemData": { "createdBy": "sample@microsoft.com", From 7785d55ec824de1f59e45ebb01e3970a8333ac4a Mon Sep 17 00:00:00 2001 From: Paul Dorsch Date: Mon, 2 Oct 2023 15:58:03 -0400 Subject: [PATCH 12/12] updated samples to be more accurate --- .../examples/Builds_CreateOrUpdate.json | 12 ++++++------ .../examples/Builds_CreateOrUpdate_NoConfig.json | 12 ++++++------ .../2023-08-01-preview/examples/Builds_Get.json | 6 +++--- .../examples/Builds_ListByBuilderResource.json | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) 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 448416bea786..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,9 +121,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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", @@ -196,9 +196,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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 38745f1b9c1f..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,9 +18,9 @@ "properties": { "provisioningState": "Succeeded", "buildStatus": "InProgress", - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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", @@ -43,9 +43,9 @@ "properties": { "provisioningState": "Creating", "buildStatus": "InProgress", - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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 d8e710e662cf..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,9 +67,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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_ListByBuilderResource.json b/specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json index c0da2d4d7602..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,9 +69,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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", @@ -139,9 +139,9 @@ } ] }, - "uploadEndpoint": "foo.azurecontainerapps.dev/upload", - "logStreamEndpoint": "foo.azurecontainerapps.dev/logstream", - "tokenEndpoint": ".../Microsoft.App/builders/testBuilder/builds/testBuild/listAuthToken" + "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",