Share via


ContainerInstanceExtensions.GetContainerGroups Method

Definition

Overloads

GetContainerGroups(ResourceGroupResource)

Gets a collection of ContainerGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetContainerGroups() instead.

GetContainerGroups(SubscriptionResource, CancellationToken)

Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups
  • Operation Id: ContainerGroups_List
  • Default Api Version: 2024-05-01-preview
  • Resource: ContainerGroupResource

GetContainerGroups(ResourceGroupResource)

Source:
ContainerInstanceExtensions.cs
Source:
ContainerInstanceExtensions.cs

Gets a collection of ContainerGroupResources in the ResourceGroupResource. MockingTo mock this method, please mock GetContainerGroups() instead.

public static Azure.ResourceManager.ContainerInstance.ContainerGroupCollection GetContainerGroups (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetContainerGroups : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.ContainerInstance.ContainerGroupCollection
<Extension()>
Public Function GetContainerGroups (resourceGroupResource As ResourceGroupResource) As ContainerGroupCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of ContainerGroupResources and their operations over a ContainerGroupResource.

Exceptions

resourceGroupResource is null.

Applies to

GetContainerGroups(SubscriptionResource, CancellationToken)

Source:
ContainerInstanceExtensions.cs
Source:
ContainerInstanceExtensions.cs

Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups
  • Operation Id: ContainerGroups_List
  • Default Api Version: 2024-05-01-preview
  • Resource: ContainerGroupResource
public static Azure.Pageable<Azure.ResourceManager.ContainerInstance.ContainerGroupResource> GetContainerGroups (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default);
static member GetContainerGroups : Azure.ResourceManager.Resources.SubscriptionResource * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.ContainerInstance.ContainerGroupResource>
<Extension()>
Public Function GetContainerGroups (subscriptionResource As SubscriptionResource, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of ContainerGroupResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of ContainerGroupResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to