@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AutomationManagement
@base https://management.azure.com
@version 2018-06-30
@auth OAuth2
@endpoints 18
@toc subscriptions(18)

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content
@desc Retrieve the content of runbook draft identified by runbook name.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/content
@desc Replaces the runbook draft content.
@required {runbookName: any # The runbook name., runbookContent: map # The runbook draft content.}
@returns(200) OK
@returns(202) Accepted and  the operation will complete asynchronously.

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft
@desc Retrieve the runbook draft identified by runbook name.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/publish
@desc Publish runbook draft.
@required {runbookName: any # The parameters supplied to the publish runbook operation.}
@returns(202) Accepted and  the operation will complete asynchronously.

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/undoEdit
@desc Undo draft edit to last known published state identified by runbook name.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/content
@desc Retrieve the content of runbook identified by runbook name.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}
@desc Retrieve the runbook identified by runbook name.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}
@desc Create the runbook identified by runbook name.
@required {runbookName: any # The runbook name., parameters: any # The create or update parameters for runbook. Provide either content link for a published runbook or draft, not both.}
@returns(200) OK
@returns(201) Created

@endpoint PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}
@desc Update the runbook identified by runbook name.
@required {runbookName: any # The runbook name., parameters: any # The update parameters for runbook.}
@returns(200) OK

@endpoint DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}
@desc Delete the runbook by name.
@required {runbookName: any # The runbook name.}
@returns(200) OK
@returns(204) No Content

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks
@desc Retrieve a list of runbooks.
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams/{jobStreamId}
@desc Retrieve a test job stream of the test job identified by runbook name and stream id.
@required {runbookName: any # The runbook name., jobStreamId: any # The job stream id.}
@returns(200) OK

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/streams
@desc Retrieve a list of test job streams identified by runbook name.
@required {runbookName: any # The runbook name.}
@optional {$filter: any # The filter to apply on the operation.}
@returns(200) OK

@endpoint PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob
@desc Create a test job of the runbook.
@required {runbookName: any # The parameters supplied to the create test job operation., parameters: any # The parameters supplied to the create test job operation.}
@returns(201) Created

@endpoint GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob
@desc Retrieve the test job for the specified runbook.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/resume
@desc Resume the test job.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/stop
@desc Stop the test job.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@endpoint POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName}/draft/testJob/suspend
@desc Suspend the test job.
@required {runbookName: any # The runbook name.}
@returns(200) OK

@end
