Builds - Create Or Update
BuildResource 만들기
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}?api-version=2023-11-02-preview
URI 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
builder
|
path | True |
string minLength: 2maxLength: 32 pattern: ^[-\w\._\(\)]+$ |
작성기의 이름입니다. |
|
build
|
path | True |
string minLength: 2maxLength: 64 pattern: ^[-\w\._\(\)]+$ |
빌드의 이름입니다. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
리소스 그룹의 이름입니다. 이름은 대/소문자를 구분하지 않습니다. |
|
subscription
|
path | True |
string (uuid) |
대상 구독의 ID입니다. 값은 UUID여야 합니다. |
|
api-version
|
query | True |
string minLength: 1 |
이 작업에 사용할 API 버전입니다. |
요청 본문
| Name | 형식 | Description |
|---|---|---|
| properties.configuration |
빌드의 구성입니다. |
|
| properties.destinationContainerRegistry |
최종 이미지가 업로드될 컨테이너 레지스트리입니다. |
응답
| Name | 형식 | Description |
|---|---|---|
| 200 OK |
ARM 만들기 또는 업데이트 작업이 성공적으로 완료되었습니다. |
|
| 201 Created |
ARM 만들기 또는 업데이트 작업이 시작되었습니다. 헤더 Azure-AsyncOperation: string |
|
| Other Status Codes |
일반적인 오류 응답입니다. |
보안
azure_auth
Azure Active Directory OAuth2 흐름.
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
| Name | Description |
|---|---|
| user_impersonation | 사용자 계정 가장 |
예제
|
Builds_Create |
|
Builds_Create |
Builds_CreateOrUpdate_NoConfig
샘플 요청
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild?api-version=2023-11-02-preview
{}
샘플 응답
{
"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://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",
"createdByType": "User",
"createdAt": "2022-10-11T11:05:51.4940669Z",
"lastModifiedBy": "sample@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-10-11T11:05:51.4940669Z"
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}
{
"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://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",
"createdByType": "User",
"createdAt": "2022-10-11T11:05:51.4940669Z",
"lastModifiedBy": "sample@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-10-11T11:05:51.4940669Z"
}
}
Builds_CreateOrUpdate_WithConfig
샘플 요청
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/builders/testBuilder/builds/testBuild-123456789az?api-version=2023-11-02-preview
{
"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"
]
}
}
]
}
}
}
샘플 응답
{
"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": "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",
"createdByType": "User",
"createdAt": "2022-10-11T11:05:51.4940669Z",
"lastModifiedBy": "sample@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-10-11T11:05:51.4940669Z"
}
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.App/locations/{location}/operationStatuses/{operationId}
{
"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": "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",
"createdByType": "User",
"createdAt": "2022-10-11T11:05:51.4940669Z",
"lastModifiedBy": "sample@microsoft.com",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-10-11T11:05:51.4940669Z"
}
}
정의
| Name | Description |
|---|---|
|
Build |
빌드의 구성입니다. |
|
Build |
리소스 인스턴스 프로비저닝 상태입니다. |
|
Build |
개별 빌드와 관련된 정보입니다. |
|
Build |
빌드가 프로비전되면의 상태입니다. |
|
Container |
최종 이미지가 업로드될 컨테이너 레지스트리입니다. |
|
created |
리소스를 만든 ID의 형식입니다. |
|
Environment |
환경 변수를 나타내는 모델입니다. |
|
Error |
리소스 관리 오류 추가 정보입니다. |
|
Error |
오류 세부 정보입니다. |
|
Error |
오류 응답 |
|
Http |
http get 요청을 나타내는 모델입니다. |
|
Pre |
빌드 전 단계를 나타내는 모델입니다. |
|
system |
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다. |
BuildConfiguration
빌드의 구성입니다.
| Name | 형식 | Description |
|---|---|---|
| baseOs |
string |
앱을 빌드하고 실행하는 데 사용되는 기본 OS입니다. |
| environmentVariables |
빌드에 전달될 환경 변수 목록입니다. 환경 변수에는 비밀을 사용하면 안 됩니다. |
|
| platform |
string |
앱을 빌드하고 실행하는 데 사용할 플랫폼입니다. |
| platformVersion |
string |
앱을 빌드하고 실행하는 데 사용할 플랫폼 버전입니다. |
| preBuildSteps |
빌드 전에 수행할 단계 목록입니다. |
BuildProvisioningState
리소스 인스턴스 프로비저닝 상태입니다.
| 값 | Description |
|---|---|
| Succeeded | |
| Failed | |
| Canceled | |
| Creating | |
| Updating | |
| Deleting |
BuildResource
개별 빌드와 관련된 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| id |
string |
리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
리소스의 이름 |
| properties.buildStatus |
빌드가 프로비전되면의 상태입니다. |
|
| properties.configuration |
빌드의 구성입니다. |
|
| properties.destinationContainerRegistry |
최종 이미지가 업로드될 컨테이너 레지스트리입니다. |
|
| properties.logStreamEndpoint |
string |
빌드 로그를 스트리밍할 수 있는 엔드포인트입니다. |
| properties.provisioningState |
빌드 프로비전 상태입니다. |
|
| properties.tokenEndpoint |
string |
로그 스트리밍 및 소스 코드 업로드에 대한 인증 토큰을 검색하는 데 사용할 엔드포인트입니다. |
| properties.uploadEndpoint |
string |
소스 코드를 업로드해야 하는 엔드포인트입니다. |
| systemData |
createdBy 및 modifiedBy 정보가 포함된 Azure Resource Manager 메타데이터입니다. |
|
| type |
string |
리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts" |
BuildStatus
빌드가 프로비전되면의 상태입니다.
| 값 | Description |
|---|---|
| NotStarted | |
| InProgress | |
| Succeeded | |
| Canceled | |
| Failed |
ContainerRegistryWithCustomImage
최종 이미지가 업로드될 컨테이너 레지스트리입니다.
| Name | 형식 | Description |
|---|---|---|
| image |
string |
이미지 이름과 태그를 포함하여 최종 이미지를 업로드해야 하는 전체 이름입니다. |
| server |
string |
최종 이미지를 업로드해야 하는 컨테이너 레지스트리의 로그인 서버입니다. 작성기 리소스에는 이 컨테이너 레지스트리를 액세스하는 데 사용할 ID와 함께 정의해야 합니다. |
createdByType
리소스를 만든 ID의 형식입니다.
| 값 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
EnvironmentVariable
환경 변수를 나타내는 모델입니다.
| Name | 형식 | Description |
|---|---|---|
| name |
string |
환경 변수 이름입니다. |
| value |
string |
환경 변수 값입니다. |
ErrorAdditionalInfo
리소스 관리 오류 추가 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| info |
object |
추가 정보입니다. |
| type |
string |
추가 정보 유형입니다. |
ErrorDetail
오류 세부 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| additionalInfo |
오류 추가 정보입니다. |
|
| code |
string |
오류 코드입니다. |
| details |
오류 세부 정보입니다. |
|
| message |
string |
오류 메시지입니다. |
| target |
string |
오류 대상입니다. |
ErrorResponse
오류 응답
| Name | 형식 | Description |
|---|---|---|
| error |
오류 개체입니다. |
HttpGet
http get 요청을 나타내는 모델입니다.
| Name | 형식 | Description |
|---|---|---|
| fileName |
string |
요청을 저장해야 하는 파일의 이름입니다. |
| headers |
string[] |
요청과 함께 보낼 헤더 목록입니다. |
| url |
string |
HTTP GET 요청을 만드는 URL입니다. |
PreBuildStep
빌드 전 단계를 나타내는 모델입니다.
| Name | 형식 | Description |
|---|---|---|
| description |
string |
빌드 전 단계에 대한 설명입니다. |
| httpGet |
빌드 전에 전송할 Http get 요청입니다. |
|
| scripts |
string[] |
실행할 사용자 지정 명령 목록입니다. |
systemData
리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.
| Name | 형식 | Description |
|---|---|---|
| createdAt |
string (date-time) |
리소스 만들기의 타임스탬프(UTC)입니다. |
| createdBy |
string |
리소스를 만든 ID입니다. |
| createdByType |
리소스를 만든 ID의 형식입니다. |
|
| lastModifiedAt |
string (date-time) |
리소스 마지막 수정의 타임스탬프(UTC) |
| lastModifiedBy |
string |
리소스를 마지막으로 수정한 ID입니다. |
| lastModifiedByType |
리소스를 마지막으로 수정한 ID의 형식입니다. |