Get-AzContainerGroup
지정된 구독 및 리소스 그룹에 있는 지정된 컨테이너 그룹의 속성을 가져옵니다. 이 작업은 컨테이너, 이미지 레지스트리 자격 증명, 다시 시작 정책, IP 주소 유형, OS 유형, 상태 및 볼륨을 포함하여 각 컨테이너 그룹의 속성을 반환합니다.
Syntax
Get-AzContainerGroup
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzContainerGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzContainerGroup
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzContainerGroup
-InputObject <IContainerInstanceIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
지정된 구독 및 리소스 그룹에 있는 지정된 컨테이너 그룹의 속성을 가져옵니다. 이 작업은 컨테이너, 이미지 레지스트리 자격 증명, 다시 시작 정책, IP 주소 유형, OS 유형, 상태 및 볼륨을 포함하여 각 컨테이너 그룹의 속성을 반환합니다.
예제
예제 1: 현재 구독의 모든 컨테이너 그룹 나열
Get-AzContainerGroup
Location Name Zone ResourceGroupName
-------- ---- ---- -----------------
eastus test-cg1 test-rg
eastus test-cg2 test-rg
이 명령은 현재 구독의 모든 컨테이너 그룹을 가져옵니다.
예제 2: 특정 컨테이너 그룹 가져오기
Get-AzContainerGroup -Name test-cg1 -ResourceGroupName test-rg | Format-List
Container : {test-container1}
DnsConfigNameServer :
DnsConfigOption :
DnsConfigSearchDomain :
EncryptionPropertyKeyName :
EncryptionPropertyKeyVersion :
EncryptionPropertyVaultBaseUrl :
IPAddressDnsNameLabel :
IPAddressFqdn :
IPAddressIP : 000.000.000.000
IPAddressPort : {Microsoft.Azure.PowerShell.Cmdlets.ContainerInsta
nce.Models.Api20210301.Port, Microsoft.Azure.Power
Shell.Cmdlets.ContainerInstance.Models.Api20210301
.Port}
IPAddressType : Public
Id : /subscriptions/00000000-0000-0000-0000-000000000000
0/resourceGroups/test-rg/providers/Microsoft.Contai
nerInstance/containerGroups/test-cg1
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : Microsoft.Azure.PowerShell.Cmdlets.ContainerInstan
ce.Models.Api20210301.ContainerGroupIdentityUserAs
signedIdentities
ImageRegistryCredentials :
InitContainer : {}
InstanceViewEvent :
InstanceViewState :
Location : eastus
LogAnalyticLogType :
LogAnalyticMetadata : Microsoft.Azure.PowerShell.Cmdlets.ContainerInstan
ce.Models.Api20210301.LogAnalyticsMetadata
LogAnalyticWorkspaceId :
LogAnalyticWorkspaceKey :
LogAnalyticWorkspaceResourceId : Microsoft.Azure.PowerShell.Cmdlets.ContainerInstan
ce.Models.Api20210301.LogAnalyticsWorkspaceResourc
eId
Name : test-cg1
NetworkProfileId :
OSType : Linux
ProvisioningState : Succeeded
ResourceGroupName : test-rg
RestartPolicy : Never
Sku : Standard
Tag : Microsoft.Azure.PowerShell.Cmdlets.ContainerInstan
ce.Models.Api20210301.ResourceTags
Type : Microsoft.ContainerInstance/containerGroups
Volume :
이 명령은 지정된 컨테이너 그룹을 가져옵니다.
예제 3: 리소스 그룹에서 컨테이너 그룹 가져오기
Get-AzContainerGroup -ResourceGroupName test-rg
Location Name Zone ResourceGroupName
-------- ---- ---- -----------------
eastus test-cg1 test-rg
eastus test-cg2 test-rg
이 명령은 리소스 그룹의 컨테이너 그룹을 test-rg
가져옵니다.
예제 4: 파이핑을 사용하여 컨테이너 그룹 가져오기
Update-AzContainerGroup -Name test-cg1 -ResourceGroupName test-rg -Tag @{"test"="value"} | Get-AzContainerGroup
Location Name Zone ResourceGroupName
-------- ---- ---- -----------------
eastus test-cg1 test-rg
이 명령은 파이핑을 통해 업데이트된 컨테이너 그룹을 가져옵니다.
매개 변수
-DefaultProfile
DefaultProfile 매개 변수가 작동하지 않습니다. 다른 구독에 대해 cmdlet을 실행하는 경우 사용 가능한 경우 SubscriptionId 매개 변수를 사용합니다.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
생성할 ID 매개 변수는 INPUTOBJECT 속성에 대한 NOTES 섹션을 참조하고 해시 테이블을 만듭니다.
Type: | IContainerInstanceIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
컨테이너 그룹의 이름입니다.
Type: | String |
Aliases: | ContainerGroupName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
리소스 그룹의 이름입니다.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Microsoft Azure 구독을 고유하게 식별하는 구독 자격 증명입니다. 구독 ID는 모든 서비스 호출에 대한 URI의 파트를 형성합니다.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
입력
출력
Azure PowerShell
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기