/// <summary> /// Get cost. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the cost. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($expand=labCostDetails)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LabCost> GetAsync(this ICostsOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or replace an existing cost. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the cost. /// </param> /// <param name='labCost'> /// A cost item. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LabCost> CreateOrUpdateAsync(this ICostsOperations operations, string resourceGroupName, string labName, string name, LabCost labCost, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, labCost, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or replace an existing cost. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the cost. /// </param> /// <param name='labCost'> /// A cost item. /// </param> public static LabCost CreateOrUpdate(this ICostsOperations operations, string resourceGroupName, string labName, string name, LabCost labCost) { return(operations.CreateOrUpdateAsync(resourceGroupName, labName, name, labCost).GetAwaiter().GetResult()); }
/// <summary> /// Get cost. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the cost. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($expand=labCostDetails)' /// </param> public static LabCost Get(this ICostsOperations operations, string resourceGroupName, string labName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult()); }