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
+ }
0 commit comments