Перечисление развертываний, использующих построитель.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/listUsingDeployments?api-version=2023-12-01
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
builderName
|
path |
True
|
string
|
Имя ресурса построителя.
|
buildServiceName
|
path |
True
|
string
|
Имя ресурса службы сборки.
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов, к которой относится ресурс. Это значение можно получить от API-интерфейса диспетчера ресурсов Azure или портала.
|
serviceName
|
path |
True
|
string
|
Имя ресурса службы.
Regex pattern: ^[a-z][a-z0-9-]*[a-z0-9]$
|
subscriptionId
|
path |
True
|
string
|
Возвращает идентификатор подписки, который однозначно идентифицирует подписку Microsoft Azure. Идентификатор подписки формирует часть URI для каждого вызова службы.
|
api-version
|
query |
True
|
string
|
Версия API, используемая для данной операции.
|
Ответы
Имя |
Тип |
Описание |
200 OK
|
DeploymentList
|
Успешное завершение
|
Other Status Codes
|
CloudError
|
Ответ об ошибке, описывающий причину сбоя операции.
|
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
BuildServiceBuilder_ListDeployments
Sample Request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default/listUsingDeployments?api-version=2023-12-01
/**
* Samples for BuildServiceBuilder ListDeployments.
*/
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/
* BuildServiceBuilder_ListDeployments.json
*/
/**
* Sample code: BuildServiceBuilder_ListDeployments.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderListDeployments(com.azure.resourcemanager.AzureResourceManager azure) {
azure.springServices().manager().serviceClient().getBuildServiceBuilders().listDeploymentsWithResponse(
"myResourceGroup", "myservice", "default", "default", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.appplatform import AppPlatformManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-appplatform
# USAGE
python build_service_builder_list_deployments.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AppPlatformManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.build_service_builder.list_deployments(
resource_group_name="myResourceGroup",
service_name="myservice",
build_service_name="default",
builder_name="default",
)
print(response)
# x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_ListDeployments.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armappplatform_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appplatform/armappplatform/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/685aad3f33d355c1d9c89d493ee9398865367bd8/specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_ListDeployments.json
func ExampleBuildServiceBuilderClient_ListDeployments() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armappplatform.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewBuildServiceBuilderClient().ListDeployments(ctx, "myResourceGroup", "myservice", "default", "default", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DeploymentList = armappplatform.DeploymentList{
// Deployments: []*string{
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/default"),
// to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/green")},
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AppPlatformManagementClient } = require("@azure/arm-appplatform");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to List deployments that are using the builder.
*
* @summary List deployments that are using the builder.
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2023-12-01/examples/BuildServiceBuilder_ListDeployments.json
*/
async function buildServiceBuilderListDeployments() {
const subscriptionId =
process.env["APPPLATFORM_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["APPPLATFORM_RESOURCE_GROUP"] || "myResourceGroup";
const serviceName = "myservice";
const buildServiceName = "default";
const builderName = "default";
const credential = new DefaultAzureCredential();
const client = new AppPlatformManagementClient(credential, subscriptionId);
const result = await client.buildServiceBuilder.listDeployments(
resourceGroupName,
serviceName,
buildServiceName,
builderName,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"deployments": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/default",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/apps/test/deployments/green"
]
}
Определения
CloudError
Ответ об ошибке от службы.
CloudErrorBody
Ответ об ошибке от службы.
Имя |
Тип |
Описание |
code
|
string
|
Идентификатор ошибки. Коды инвариантны и предназначены для программного использования.
|
details
|
CloudErrorBody[]
|
Список дополнительных сведений об ошибке.
|
message
|
string
|
Сообщение, описывающее ошибку, предназначенное для отображения в пользовательском интерфейсе.
|
target
|
string
|
Целевой объект конкретной ошибки. Например, имя свойства в ошибке.
|
DeploymentList
Список идентификаторов ресурсов развертываний.
Имя |
Тип |
Описание |
deployments
|
string[]
|
Список идентификаторов ресурсов развертывания.
|