/// <summary> /// Lists all the roles configured in a data box edge/gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Role> > ListByDataBoxEdgeDeviceAsync(this IRolesOperations operations, string deviceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDataBoxEdgeDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the roles configured in a data box edge/gateway device. /// </summary> /// <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 <Role> > ListByDataBoxEdgeDeviceNextAsync(this IRolesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByDataBoxEdgeDeviceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or update a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The role name. /// </param> /// <param name='role'> /// The role properties. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Role> BeginCreateOrUpdateAsync(this IRolesOperations operations, string deviceName, string name, Role role, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, role, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the roles for the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <RoleResourceFormat> > ListByHubAsync(this IRolesOperations operations, string resourceGroupName, string hubName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubWithHttpMessagesAsync(resourceGroupName, hubName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a specific role by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static Role Get(this IRolesOperations operations, string deviceName, string name, string resourceGroupName) { return(operations.GetAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the roles configured in a data box edge/gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static IPage <Role> ListByDataBoxEdgeDevice(this IRolesOperations operations, string deviceName, string resourceGroupName) { return(operations.ListByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the roles configured in a data box edge/gateway device. /// </summary> /// <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 <Role> ListByDataBoxEdgeDeviceNext(this IRolesOperations operations, string nextPageLink) { return(operations.ListByDataBoxEdgeDeviceNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes the role on the data box edge device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IRolesOperations operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes the role on the data box edge device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static void BeginDelete(this IRolesOperations operations, string deviceName, string name, string resourceGroupName) { operations.BeginDeleteAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult(); }
/// <summary> /// Create or update a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The role name. /// </param> /// <param name='role'> /// The role properties. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static Role BeginCreateOrUpdate(this IRolesOperations operations, string deviceName, string name, Role role, string resourceGroupName) { return(operations.BeginCreateOrUpdateAsync(deviceName, name, role, resourceGroupName).GetAwaiter().GetResult()); }
public RolesController( ILogger <RolesController> logger, IRolesOperations rolesOperations) : base(logger) => _rolesOperations = rolesOperations;
/// <summary> /// Gets all the roles for the hub. /// </summary> /// <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 <RoleResourceFormat> ListByHubNext(this IRolesOperations operations, string nextPageLink) { return(operations.ListByHubNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets all the roles for the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> public static IPage <RoleResourceFormat> ListByHub(this IRolesOperations operations, string resourceGroupName, string hubName) { return(operations.ListByHubAsync(resourceGroupName, hubName).GetAwaiter().GetResult()); }