Container Logs - List
Get the logs for a specified container instance in a specified resource group and container group.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs?api-version=2018-04-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs?api-version=2018-04-01&tail={tail}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
container
|
path | True |
string |
The name of the container group. |
container
|
path | True |
string |
The name of the container instance. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client API version |
tail
|
query |
integer |
The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
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
ContainerLogsList
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1/containers/container1/logs?api-version=2018-04-01&tail=10
Sample response
{
"content": "log content"
}
Definitions
Logs
The logs.
Name | Type | Description |
---|---|---|
content |
string |
The content of the log. |