/// <summary>
 /// Get the properties of the specified container group.
 /// </summary>
 /// <remarks>
 /// Gets the properties of the specified container group in the specified
 /// subscription and resource group. The operation returns the properties of
 /// each container group including containers, image registry credentials,
 /// restart policy, IP address type, OS type, state, and volumes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ContainerGroupInner> GetAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Get a list of container groups in the specified subscription.
 /// </summary>
 /// <remarks>
 /// 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.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ContainerGroupInner> > ListAsync(this IContainerGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// Starts all containers in a container group.
 /// </summary>
 /// <remarks>
 /// Starts all containers in a container group.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginStartAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #4
0
 /// <summary>
 /// Get a list of container groups in the specified subscription and resource
 /// group.
 /// </summary>
 /// <remarks>
 /// Get a list of container groups in a specified subscription and resource
 /// group. This operation returns properties of each container group including
 /// containers, image registry credentials, restart policy, IP address type, OS
 /// type, state, and volumes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ContainerGroup> > ListByResourceGroupNextAsync(this IContainerGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #5
0
 /// <summary>
 /// Get a list of container groups in the specified subscription and resource
 /// group.
 /// </summary>
 /// <remarks>
 /// Get a list of container groups in a specified subscription and resource
 /// group. This operation returns properties of each container group including
 /// containers, image registry credentials, restart policy, IP address type, OS
 /// type, state, and volumes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 public static IPage <ContainerGroup> ListByResourceGroup(this IContainerGroupsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Restarts all containers in a container group.
 /// </summary>
 /// <remarks>
 /// Restarts all containers in a container group in place. If container image
 /// has updates, new image will be downloaded.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 public static void BeginRestart(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName)
 {
     operations.BeginRestartAsync(resourceGroupName, containerGroupName).GetAwaiter().GetResult();
 }
Exemple #7
0
 /// <summary>
 /// Get a list of container groups in the specified subscription and resource
 /// group.
 /// </summary>
 /// <remarks>
 /// Get a list of container groups in a specified subscription and resource
 /// group. This operation returns properties of each container group including
 /// containers, image registry credentials, restart policy, IP address type, OS
 /// type, state, and volumes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <ContainerGroup> ListByResourceGroupNext(this IContainerGroupsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #8
0
 /// <summary>
 /// Create or update container groups.
 /// </summary>
 /// <remarks>
 /// Create or update container groups with specified configurations.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 /// <param name='containerGroup'>
 /// The properties of the container group to be created or updated.
 /// </param>
 public static ContainerGroup BeginCreateOrUpdate(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, ContainerGroup containerGroup)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, containerGroupName, containerGroup).GetAwaiter().GetResult());
 }
Exemple #9
0
 /// <summary>
 /// Get a list of container groups in the specified subscription.
 /// </summary>
 /// <remarks>
 /// 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.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <ContainerGroup> List(this IContainerGroupsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Exemple #10
0
 /// <summary>
 /// Delete the specified container group.
 /// </summary>
 /// <remarks>
 /// Delete the specified container group in the specified subscription and
 /// resource group. The operation does not delete other resources provided by
 /// the user, such as volumes.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 public static ContainerGroup Delete(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName)
 {
     return(operations.DeleteAsync(resourceGroupName, containerGroupName).GetAwaiter().GetResult());
 }
Exemple #11
0
 /// <summary>
 /// Get all network dependencies for container group.
 /// </summary>
 /// <remarks>
 /// Gets all the network dependencies for this container group to allow
 /// complete control of network setting and configuration. For container
 /// groups, this will always be an empty list.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <string> > GetOutboundNetworkDependenciesEndpointsAsync(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, containerGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #12
0
 /// <summary>
 /// Get all network dependencies for container group.
 /// </summary>
 /// <remarks>
 /// Gets all the network dependencies for this container group to allow
 /// complete control of network setting and configuration. For container
 /// groups, this will always be an empty list.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='containerGroupName'>
 /// The name of the container group.
 /// </param>
 public static IList <string> GetOutboundNetworkDependenciesEndpoints(this IContainerGroupsOperations operations, string resourceGroupName, string containerGroupName)
 {
     return(operations.GetOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, containerGroupName).GetAwaiter().GetResult());
 }