Skip to main content

containers_logs

Creates, updates, deletes, gets or lists a containers_logs resource.

Overview

Namecontainers_logs
TypeResource
Idazure.container_instances.containers_logs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentstringThe content of the log.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsubscriptionId, resourceGroupName, containerGroupName, containerNametail, timestampsGet the logs for a specified container instance in a specified resource group and container group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
containerGroupNamestringThe name of the container group.
containerNamestringThe name of the container instance.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
tailinteger (int32)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.
timestampsbooleanIf true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.

SELECT examples

Get the logs for a specified container instance in a specified resource group and container group.

SELECT
content
FROM azure.container_instances.containers_logs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND containerGroupName = '{{ containerGroupName }}' -- required
AND containerName = '{{ containerName }}' -- required
AND tail = '{{ tail }}'
AND timestamps = '{{ timestamps }}'
;