/// <summary> /// Creates a waiter using the provided configuration. /// </summary> /// <param name="request">Request to send.</param> /// <param name="config">Wait Configuration</param> /// <param name="targetStates">Desired resource states. If multiple states are provided then the waiter will return once the resource reaches any of the provided states</param> /// <returns>a new Oci.common.Waiter instance</returns> public Waiter <GetExportSetRequest, GetExportSetResponse> ForExportSet(GetExportSetRequest request, WaiterConfiguration config, params ExportSet.LifecycleStateEnum[] targetStates) { var agent = new WaiterAgent <GetExportSetRequest, GetExportSetResponse>( request, request => client.GetExportSet(request), response => targetStates.Contains(response.ExportSet.LifecycleState.Value), targetStates.Contains(ExportSet.LifecycleStateEnum.Deleted) ); return(new Waiter <GetExportSetRequest, GetExportSetResponse>(config, agent)); }
/** * Retrieves the details of an export set for a mount target * * @param exportSetId the OCID of the export set (obtained from a MountTarget) */ private static async Task GetExportSet(FileStorageClient fileStorageClient, string exportSetId) { logger.Info("Get export set for mount target"); GetExportSetRequest getExportSetRequest = new GetExportSetRequest { ExportSetId = exportSetId }; GetExportSetResponse getExportSetResponse = await fileStorageClient.GetExportSet(getExportSetRequest); logger.Info($"Export set for mount target: {getExportSetResponse.ExportSet.DisplayName}"); }