/// <summary> /// Gets the default account information set for the scope. /// </summary> /// <remarks> /// Get the default account for the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scopeTenantId'> /// The tenant ID. /// </param> /// <param name='scopeType'> /// The scope for the default account. Possible values include: 'Tenant', /// 'Subscription' /// </param> /// <param name='scope'> /// The Id of the scope object, for example if the scope is "Subscription" then /// it is the ID of that subscription. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DefaultAccountPayload> GetAsync(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(scopeTenantId, scopeType, scope, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Sets the default account for the scope. /// </summary> /// <remarks> /// Set the default account for the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultAccountPayload'> /// The payload containing the default account information and the scope. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DefaultAccountPayload> SetAsync(this IDefaultAccountsOperations operations, DefaultAccountPayload defaultAccountPayload, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.SetWithHttpMessagesAsync(defaultAccountPayload, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Sets the default account for the scope. /// </summary> /// <remarks> /// Set the default account for the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='defaultAccountPayload'> /// The payload containing the default account information and the scope. /// </param> public static DefaultAccountPayload Set(this IDefaultAccountsOperations operations, DefaultAccountPayload defaultAccountPayload) { return(operations.SetAsync(defaultAccountPayload).GetAwaiter().GetResult()); }
/// <summary> /// Gets the default account information set for the scope. /// </summary> /// <remarks> /// Get the default account for the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scopeTenantId'> /// The tenant ID. /// </param> /// <param name='scopeType'> /// The scope for the default account. Possible values include: 'Tenant', /// 'Subscription' /// </param> /// <param name='scope'> /// The Id of the scope object, for example if the scope is "Subscription" then /// it is the ID of that subscription. /// </param> public static DefaultAccountPayload Get(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string)) { return(operations.GetAsync(scopeTenantId, scopeType, scope).GetAwaiter().GetResult()); }
/// <summary> /// Removes the default account from the scope. /// </summary> /// <remarks> /// Remove the default account from the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scopeTenantId'> /// The tenant ID. /// </param> /// <param name='scopeType'> /// The scope for the default account. Possible values include: 'Tenant', /// 'Subscription' /// </param> /// <param name='scope'> /// The Id of the scope object, for example if the scope is "Subscription" then /// it is the ID of that subscription. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RemoveAsync(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RemoveWithHttpMessagesAsync(scopeTenantId, scopeType, scope, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Removes the default account from the scope. /// </summary> /// <remarks> /// Remove the default account from the scope. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='scopeTenantId'> /// The tenant ID. /// </param> /// <param name='scopeType'> /// The scope for the default account. Possible values include: 'Tenant', /// 'Subscription' /// </param> /// <param name='scope'> /// The Id of the scope object, for example if the scope is "Subscription" then /// it is the ID of that subscription. /// </param> public static void Remove(this IDefaultAccountsOperations operations, System.Guid scopeTenantId, string scopeType, string scope = default(string)) { operations.RemoveAsync(scopeTenantId, scopeType, scope).GetAwaiter().GetResult(); }