Freigeben über


Container Apps Revisions - Get Revision

Get a revision of a Container App.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
containerAppName
path True

string

Name of the Container App.

name
path True

string

Name of the Container App Revision.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

api-version
query True

string

API Version

Responses

Name Type Description
200 OK

Revision

OK

Other Status Codes

DefaultErrorResponse

App Service error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get Container App's revision

Sample request

GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye?api-version=2024-04-01

Sample response

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.WebcontainerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye",
  "name": "testcontainerApp0-pjxhsye",
  "type": "Microsoft.Web/containerApps/revisions",
  "location": "East US",
  "properties": {
    "createdTime": "2021-05-24T21:24:22+00:00",
    "fqdn": "testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io",
    "template": {
      "containers": [
        {
          "image": "repo/testcontainerApp0:v2",
          "name": "testcontainerApp0",
          "resources": {
            "cpu": 0.2,
            "memory": "100Mi"
          }
        }
      ],
      "scale": {
        "minReplicas": 1,
        "maxReplicas": 5,
        "rules": [
          {
            "name": "httpscalingrule",
            "http": {
              "metadata": {
                "concurrentRequests": "50"
              }
            }
          }
        ]
      },
      "dapr": {
        "enabled": true,
        "appPort": 3000
      }
    },
    "active": true,
    "replicas": 1
  }
}

Definitions

Name Description
Container

Container App container definition.

ContainerResources

Container App container resource requirements.

CustomScaleRule

Container App container Custom scaling rule.

Dapr

Container App Dapr configuration.

DaprComponent

Dapr component configuration

DaprMetadata

Container App Dapr component metadata.

DefaultErrorResponse

App Service error response.

Details
EnvironmentVar

Container App container environment variable.

Error

Error model.

HttpScaleRule

Container App container Custom scaling rule.

QueueScaleRule

Container App container Azure Queue based scaling rule.

Revision

Container App Revision.

RevisionHealthState

Current health State of the revision

RevisionProvisioningState

Current provisioning State of the revision

Scale

Container App scaling configurations.

ScaleRule

Container App container scaling rule.

ScaleRuleAuth

Auth Secrets for Container App Scale Rule

Template

Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created

Container

Container App container definition.

Name Type Description
args

string[]

Container start command arguments.

command

string[]

Container start command.

env

EnvironmentVar[]

Container environment variables.

image

string

Container image tag.

name

string

Custom container name.

resources

ContainerResources

Container resource requirements.

ContainerResources

Container App container resource requirements.

Name Type Description
cpu

number

Required CPU in cores, e.g. 0.5

memory

string

Required memory, e.g. "250Mb"

CustomScaleRule

Container App container Custom scaling rule.

Name Type Description
auth

ScaleRuleAuth[]

Authentication secrets for the custom scale rule.

metadata

object

Metadata properties to describe custom scale rule.

type

string

Type of the custom scale rule eg: azure-servicebus, redis etc.

Dapr

Container App Dapr configuration.

Name Type Description
appId

string

Dapr application identifier

appPort

integer

Port on which the Dapr side car

components

DaprComponent[]

Collection of Dapr components

enabled

boolean

Boolean indicating if the Dapr side car is enabled

DaprComponent

Dapr component configuration

Name Type Description
metadata

DaprMetadata[]

Component metadata

name

string

Component name

type

string

Component type

version

string

Component version

DaprMetadata

Container App Dapr component metadata.

Name Type Description
name

string

Metadata property name.

secretRef

string

Name of the Container App secret from which to pull the metadata property value.

value

string

Metadata property value.

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

EnvironmentVar

Container App container environment variable.

Name Type Description
name

string

Environment variable name.

secretRef

string

Name of the Container App secret from which to pull the environment variable value.

value

string

Non-secret environment variable value.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

HttpScaleRule

Container App container Custom scaling rule.

Name Type Description
auth

ScaleRuleAuth[]

Authentication secrets for the custom scale rule.

metadata

object

Metadata properties to describe http scale rule.

QueueScaleRule

Container App container Azure Queue based scaling rule.

Name Type Description
auth

ScaleRuleAuth[]

Authentication secrets for the queue scale rule.

queueLength

integer

Queue length.

queueName

string

Queue name.

Revision

Container App Revision.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.

location

string

Resource Location.

name

string

Resource Name.

properties.active

boolean

Boolean describing if the Revision is Active

properties.createdTime

string

Timestamp describing when the revision was created by controller

properties.fqdn

string

Fully qualified domain name of the revision

properties.healthState

RevisionHealthState

Current health State of the revision

properties.provisioningError

string

Optional Field - Platform Error Message

properties.provisioningState

RevisionProvisioningState

Current provisioning State of the revision

properties.replicas

integer

Number of pods currently running for this revision

properties.template

Template

Container App Revision Template with all possible settings and the defaults if user did not provide them. The defaults are populated as they were at the creation time

properties.trafficWeight

integer

Traffic weight assigned to this revision

tags

object

Resource tags.

type

string

Resource type.

RevisionHealthState

Current health State of the revision

Name Type Description
Healthy

string

None

string

Unhealthy

string

RevisionProvisioningState

Current provisioning State of the revision

Name Type Description
Deprovisioned

string

Deprovisioning

string

Failed

string

Provisioned

string

Provisioning

string

Scale

Container App scaling configurations.

Name Type Description
maxReplicas

integer

Optional. Maximum number of container replicas. Defaults to 10 if not set.

minReplicas

integer

Optional. Minimum number of container replicas.

rules

ScaleRule[]

Scaling rules.

ScaleRule

Container App container scaling rule.

Name Type Description
azureQueue

QueueScaleRule

Azure Queue based scaling.

custom

CustomScaleRule

Custom scale rule.

http

HttpScaleRule

HTTP requests based scaling.

name

string

Scale Rule Name

ScaleRuleAuth

Auth Secrets for Container App Scale Rule

Name Type Description
secretRef

string

Name of the Container App secret from which to pull the auth params.

triggerParameter

string

Trigger Parameter that uses the secret

Template

Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created

Name Type Description
containers

Container[]

List of container definitions for the Container App.

dapr

Dapr

Dapr configuration for the Container App.

revisionSuffix

string

User friendly suffix that is appended to the revision name

scale

Scale

Scaling properties for the Container App.