Deployment Scripts - Get Logs Default

Gets deployment script logs for a given deployment script name.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default?api-version=2020-10-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName}/logs/default?api-version=2020-10-01&tail={tail}

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

scriptName
path True

string

Name of the deployment script.

subscriptionId
path True

string

Subscription Id which 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 deployment script log. Valid value is a positive number up to 1000. If 'tail' is not provided, all available logs are shown up to container instance log capacity of 4mb.

Responses

Name Type Description
200 OK

ScriptLog

OK -- Returns deployment script logs if available.

Other Status Codes

DeploymentScriptsError

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

DeploymentScriptsGetLogs
DeploymentScriptsGetLogsWithTail

DeploymentScriptsGetLogs

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript/logs/default?api-version=2020-10-01

Sample Response

{
  "properties": {
    "log": "script execution stdout/stderr logs"
  }
}

DeploymentScriptsGetLogsWithTail

Sample Request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/script-rg/providers/Microsoft.Resources/deploymentScripts/MyDeploymentScript/logs/default?api-version=2020-10-01&tail=5

Sample Response

{
  "properties": {
    "log": "script execution stdout/stderr logs"
  }
}

Definitions

Name Description
DeploymentScriptsError

Deployment scripts error response.

ErrorAdditionalInfo

The resource management error additional info.

ErrorResponse

Error Response

ScriptLog

Script execution log object.

DeploymentScriptsError

Deployment scripts error response.

Name Type Description
error

ErrorResponse

Error Response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorResponse

Error Response

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorResponse[]

The error details.

message

string

The error message.

target

string

The error target.

ScriptLog

Script execution log object.

Name Type Description
id

string

String Id used to locate any resource on Azure.

name

string

Name of this resource.

properties.log

string

Script execution logs in text format.

type

string

Type of this resource.