Container - List Logs
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-10-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs?api-version=2018-10-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 |
|
Other Status Codes |
Error response describing why the operation failed. |
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
ContainerListLogs
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1/containers/container1/logs?api-version=2018-10-01&tail=10
Sample Response
{
"content": "log content"
}
Definitions
Name | Description |
---|---|
Cloud |
An error response from the Batch service. |
Cloud |
An error response from the Batch service. |
Logs |
The logs. |
CloudError
An error response from the Batch service.
Name | Type | Description |
---|---|---|
error |
An error response from the Batch service. |
CloudErrorBody
An error response from the Batch service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
target |
string |
The target of the particular error. For example, the name of the property in error. |
Logs
The logs.
Name | Type | Description |
---|---|---|
content |
string |
The content of the log. |