DevBoxesClient.DelayAllActions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DelayAllActions(String, String, String, DateTimeOffset, RequestContext) |
[Protocol Method] Delays all actions.
|
DelayAllActions(String, String, String, DateTimeOffset, CancellationToken) |
Delays all actions. |
DelayAllActions(String, String, String, DateTimeOffset, RequestContext)
- Source:
- DevBoxesClient.cs
- Source:
- DevBoxesClient.cs
[Protocol Method] Delays all actions.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler DelayAllActions(String, String, String, DateTimeOffset, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> DelayAllActions (string projectName, string userId, string devBoxName, DateTimeOffset delayUntil, Azure.RequestContext context);
abstract member DelayAllActions : string * string * string * DateTimeOffset * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.DelayAllActions : string * string * string * DateTimeOffset * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function DelayAllActions (projectName As String, userId As String, devBoxName As String, delayUntil As DateTimeOffset, 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.
- delayUntil
- DateTimeOffset
The time to delay the Dev Box action or actions until.
- 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 DelayAllActions 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.DelayAllActions("<projectName>", "<userId>", "<devBoxName>", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("result").ToString());
}
This sample shows how to call DelayAllActions 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.DelayAllActions("<projectName>", "<userId>", "<devBoxName>", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("result").ToString());
Console.WriteLine(result.GetProperty("action").GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("action").GetProperty("actionType").ToString());
Console.WriteLine(result.GetProperty("action").GetProperty("sourceId").ToString());
Console.WriteLine(result.GetProperty("action").GetProperty("suspendedUntil").ToString());
Console.WriteLine(result.GetProperty("action").GetProperty("next").GetProperty("scheduledTime").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString());
}
Applies to
DelayAllActions(String, String, String, DateTimeOffset, CancellationToken)
- Source:
- DevBoxesClient.cs
Delays all actions.
public virtual Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxActionDelayResult> DelayAllActions (string projectName, string userId, string devBoxName, DateTimeOffset delayUntil, System.Threading.CancellationToken cancellationToken = default);
abstract member DelayAllActions : string * string * string * DateTimeOffset * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxActionDelayResult>
override this.DelayAllActions : string * string * string * DateTimeOffset * System.Threading.CancellationToken -> Azure.Pageable<Azure.Developer.DevCenter.Models.DevBoxActionDelayResult>
Public Overridable Function DelayAllActions (projectName As String, userId As String, devBoxName As String, delayUntil As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of DevBoxActionDelayResult)
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.
- delayUntil
- DateTimeOffset
The time to delay the Dev Box action or actions until.
- 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 DelayAllActions.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
foreach (DevBoxActionDelayResult item in client.DelayAllActions("<projectName>", "<userId>", "<devBoxName>", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")))
{
}
This sample shows how to call DelayAllActions with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DevBoxesClient client = new DevBoxesClient(endpoint, credential);
foreach (DevBoxActionDelayResult item in client.DelayAllActions("<projectName>", "<userId>", "<devBoxName>", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")))
{
}
Applies to
Azure SDK for .NET