Share via


DevBoxesClient.GetDevBoxActions Method

Definition

Overloads

GetDevBoxActions(String, String, String, RequestContext)

[Protocol Method] Lists actions on a Dev Box.

GetDevBoxActions(String, String, String, CancellationToken)

Lists actions on a Dev Box.

GetDevBoxActions(String, String, String, RequestContext)

Source:
DevBoxesClient.cs
Source:
DevBoxesClient.cs

[Protocol Method] Lists actions on a Dev Box.

public virtual Azure.Pageable<BinaryData> GetDevBoxActions (string projectName, string userId, string devBoxName, Azure.RequestContext context);
abstract member GetDevBoxActions : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetDevBoxActions : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetDevBoxActions (projectName As String, userId As String, devBoxName As String, context As RequestContext) As Pageable(Of BinaryData)

Parameters

projectName
String

Name of the project.

userId
String

The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.

devBoxName
String

Display name for the Dev Box.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

projectName, userId or devBoxName is null.

projectName, userId or devBoxName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetDevBoxActions and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

foreach (BinaryData item in client.GetDevBoxActions("<projectName>", "<userId>", "<devBoxName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("actionType").ToString());
    Console.WriteLine(result.GetProperty("sourceId").ToString());
}

This sample shows how to call GetDevBoxActions with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

foreach (BinaryData item in client.GetDevBoxActions("<projectName>", "<userId>", "<devBoxName>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("name").ToString());
    Console.WriteLine(result.GetProperty("actionType").ToString());
    Console.WriteLine(result.GetProperty("sourceId").ToString());
    Console.WriteLine(result.GetProperty("suspendedUntil").ToString());
    Console.WriteLine(result.GetProperty("next").GetProperty("scheduledTime").ToString());
}

Applies to

GetDevBoxActions(String, String, String, CancellationToken)

Source:
DevBoxesClient.cs

Lists actions on a Dev Box.

public virtual Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxAction> GetDevBoxActions (string projectName, string userId, string devBoxName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDevBoxActions : string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxAction>
override this.GetDevBoxActions : string * string * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxAction>
Public Overridable Function GetDevBoxActions (projectName As String, userId As String, devBoxName As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of DevBoxAction)

Parameters

projectName
String

Name of the project.

userId
String

The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.

devBoxName
String

Display name for the Dev Box.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

projectName, userId or devBoxName is null.

projectName, userId or devBoxName is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetDevBoxActions.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

foreach (DevBoxAction item in client.GetDevBoxActions("<projectName>", "<userId>", "<devBoxName>"))
{
}

This sample shows how to call GetDevBoxActions with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);

foreach (DevBoxAction item in client.GetDevBoxActions("<projectName>", "<userId>", "<devBoxName>"))
{
}

Applies to