Skip to content

Commit abe5f8b

Browse files
Re-added deleted cmdlet file GetAzureAutomationJobOutputRecord.cs
1 parent ee95641 commit abe5f8b

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System;
16+
using System.Management.Automation;
17+
using System.Security.Permissions;
18+
using Microsoft.Azure.Commands.Automation.Model;
19+
20+
namespace Microsoft.Azure.Commands.Automation.Cmdlet
21+
{
22+
/// <summary>
23+
/// Gets azure automation job stream record for a given job.
24+
/// </summary>
25+
[Cmdlet(VerbsCommon.Get, "AzureRmAutomationJobOutputRecord")]
26+
[OutputType(typeof(JobStreamRecord))]
27+
public class GetAzureAutomationJobOutputRecord : AzureAutomationBaseCmdlet
28+
{
29+
/// <summary>
30+
/// Gets or sets the job id
31+
/// </summary>
32+
[Parameter(Mandatory = true, Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = "The job Id")]
33+
public Guid JobId { get; set; }
34+
35+
/// <summary>
36+
/// Gets or sets the job stream record id
37+
/// </summary>
38+
[Alias("StreamRecordId")]
39+
[Parameter(Mandatory = true, Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = "The stream record id")]
40+
[ValidateNotNullOrEmpty]
41+
public string Id { get; set; }
42+
43+
/// <summary>
44+
/// Execute this cmdlet.
45+
/// </summary>
46+
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
47+
protected override void AutomationProcessRecord()
48+
{
49+
var ret = this.AutomationClient.GetJobStreamRecord(this.ResourceGroupName, this.AutomationAccountName, this.JobId, this.Id);
50+
this.GenerateCmdletOutput(ret);
51+
}
52+
}
53+
}

src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
</ItemGroup>
128128
<ItemGroup>
129129
<Compile Include="Cmdlet\AzureAutomationBaseCmdlet.cs" />
130+
<Compile Include="Cmdlet\GetAzureAutomationJobOutputRecord.cs" />
130131
<Compile Include="Cmdlet\ImportAzureAutomationDscNodeConfiguration.cs" />
131132
<Compile Include="Cmdlet\ExportAzureAutomationDscConfiguration.cs" />
132133
<Compile Include="Cmdlet\ExportAzureAutomationDscNodeReportContent.cs" />

0 commit comments

Comments
 (0)