Get-AzBatchJob
Batch 계정 또는 작업 일정에 대한 Batch 작업을 가져옵니다.
Syntax
Get-AzBatchJob
[-JobScheduleId <String>]
[-Filter <String>]
[-MaxCount <Int32>]
[-Select <String>]
[-Expand <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchJob
[[-Id] <String>]
[-Select <String>]
[-Expand <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzBatchJob
[[-JobSchedule] <PSCloudJobSchedule>]
[-Filter <String>]
[-MaxCount <Int32>]
[-Select <String>]
[-Expand <String>]
-BatchContext <BatchAccountContext>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzBatchJob cmdlet은 BatchAccountContext 매개 변수로 지정된 Batch 계정에 대한 Azure Batch 작업을 가져옵니다. ID 매개 변수를 사용하여 단일 작업을 가져올 수 있습니다. 필터 매개 변수를 사용하여 OData(Open Data Protocol) 필터와 일치하는 작업을 가져올 수 있습니다. 작업 일정 ID 또는 PSCloudJobSchedule 인스턴스를 제공하는 경우 이 cmdlet은 해당 작업 일정에 대한 작업만 반환합니다.
예제
예제 1: ID별 Batch 작업 가져오기
Get-AzBatchJob -Id "Job01" -BatchContext $Context
CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:12:07 PM
DisplayName :
ETag : 0x8D29535B2941439
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : Job01
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:12:07 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:12:07 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/Job01
이 명령은 ID Job01이 있는 작업을 가져옵니다. Get-AzBatchAccountKey cmdlet을 사용하여 $Context 변수에 컨텍스트를 할당합니다.
예제 2: 작업 일정에 대한 모든 활성 작업 가져오기
Get-AzBatchJob -JobScheduleId "JobSchedule27" -Filter "state eq 'active'" -BatchContext $Context
CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:15:44 PM
DisplayName :
ETag : 0x8D2953633DD13E1
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : JobSchedule27:job-1
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:15:44 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:15:44 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/JobSchedule27:job-1
이 명령은 ID JobSchedule27이 있는 작업 일정에 대한 활성 작업을 가져옵니다.
예제 3: 파이프라인을 사용하여 작업 일정에 따라 모든 작업을 가져옵니다.
Get-AzBatchJobSchedule -Id "JobSchedule27" -BatchContext $Context | Get-AzBatchJob -BatchContext $Context
CommonEnvironmentSettings :
Constraints : Microsoft.Azure.Commands.Batch.Models.PSJobConstraints
CreationTime : 7/25/2015 9:15:44 PM
DisplayName :
ETag : 0x8D2953633DD13E1
ExecutionInformation : Microsoft.Azure.Commands.Batch.Models.PSJobExecutionInformation
Id : JobSchedule27:job-1
JobManagerTask :
JobPreparationTask :
JobReleaseTask :
LastModified : 7/25/2015 9:15:44 PM
Metadata :
PoolInformation : Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
PreviousState :
PreviousStateTransitionTime :
Priority : 0
State : Active
StateTransitionTime : 7/25/2015 9:15:44 PM
Statistics :
Url : https://pfuller.westus.batch.azure.com/jobs/JobSchedule27:job-1
이 명령은 Get-AzBatchJobSchedule cmdlet을 사용하여 ID JobSchedule27이 있는 작업 일정을 가져옵니다. 이 명령은 파이프라인 연산자를 사용하여 해당 작업 일정을 현재 cmdlet에 전달합니다. 이 명령은 해당 작업 일정에 대한 모든 작업을 가져옵니다.
매개 변수
-BatchContext
이 cmdlet이 Batch 서비스와 상호 작용하는 데 사용하는 BatchAccountContext 인스턴스를 지정합니다. Get-AzBatchAccount cmdlet을 사용하여 BatchAccountContext를 가져오는 경우 Batch 서비스와 상호 작용할 때 Microsoft Entra 인증이 사용됩니다. 대신 공유 키 인증을 사용하려면 Get-AzBatchAccountKey cmdlet을 사용하여 액세스 키가 채워진 BatchAccountContext 개체를 가져옵니다. 공유 키 인증을 사용하는 경우 기본 액세스 키가 기본적으로 사용됩니다. 사용할 키를 변경하려면 BatchAccountContext.KeyInUse 속성을 설정합니다.
Type: | BatchAccountContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독입니다.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Expand
OData(Open Data Protocol) expand 절을 지정합니다. 이 매개 변수의 값을 지정하여 가져오는 기본 엔터티의 연결된 엔터티를 가져옵니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
작업에 대한 OData 필터 절을 지정합니다. 필터를 지정하지 않으면 이 cmdlet은 Batch 계정 또는 작업 일정에 대한 모든 작업을 반환합니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Id
이 cmdlet이 가져오는 작업의 ID를 지정합니다. 와일드 카드 문자를 지정할 수 없습니다.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobSchedule
작업이 포함된 작업 일정을 나타내는 PSCloudJobSchedule 개체를 지정합니다. PSCloudJobSchedule 개체를 가져오려면 Get-AzBatchJobSchedule cmdlet을 사용합니다.
Type: | PSCloudJobSchedule |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-JobScheduleId
작업이 포함된 작업 일정의 ID를 지정합니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaxCount
반환할 작업의 최대 수를 지정합니다. 0 이하의 값을 지정하는 경우 cmdlet은 상한을 사용하지 않습니다. 기본값은 1000입니다.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Select
OData select 절을 지정합니다. 이 매개 변수의 값을 지정하여 모든 개체 속성이 아닌 특정 속성을 가져옵니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |