Example #1
0
 /// <summary>
 /// Gets a list of workflows by subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Workflow> > ListBySubscriptionAsync(this IWorkflowsOperations operations, ODataQuery <WorkflowFilter> odataQuery = default(ODataQuery <WorkflowFilter>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkflowInner> GetAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <WorkflowInner> > ListByResourceGroupAsync(this IWorkflowsOperations operations, string resourceGroupName, ODataQuery <WorkflowFilterInner> odataQuery = default(ODataQuery <WorkflowFilterInner>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #4
0
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </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 <Workflow> > ListByResourceGroupNextAsync(this IWorkflowsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #5
0
 /// <summary>
 /// Get the workflow callback Url.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='listCallbackUrl'>
 /// Which callback url to list.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkflowTriggerCallbackUrl> ListCallbackUrlAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListCallbackUrlWithHttpMessagesAsync(resourceGroupName, workflowName, listCallbackUrl, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Generates the upgraded definition for a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='targetSchemaVersion'>
 /// The target schema version.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GenerateUpgradedDefinitionAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, string targetSchemaVersion = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateUpgradedDefinitionWithHttpMessagesAsync(resourceGroupName, workflowName, targetSchemaVersion, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #7
0
 /// <summary>
 /// Abort the given workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='workflowId'>
 /// workflow Id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WorkflowsAbortHeaders> AbortAsync(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName, string workflowId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AbortWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, workflowId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations          = new Operations(this);
     StorageSyncServices = new StorageSyncServicesOperations(this);
     SyncGroups          = new SyncGroupsOperations(this);
     CloudEndpoints      = new CloudEndpointsOperations(this);
     ServerEndpoints     = new ServerEndpointsOperations(this);
     RegisteredServers   = new RegisteredServersOperations(this);
     Workflows           = new WorkflowsOperations(this);
     BaseUri             = new System.Uri("https://management.azure.com");
     ApiVersion          = "2019-02-01";
     AcceptLanguage      = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Validates the workflow definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='location'>
 /// The workflow location.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='workflow'>
 /// The workflow definition.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ValidateAsync(this IWorkflowsOperations operations, string resourceGroupName, string location, string workflowName, WorkflowInner workflow, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.ValidateWithHttpMessagesAsync(resourceGroupName, location, workflowName, workflow, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #10
0
 /// <summary>
 /// Gets a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 public static Workflow Get(this IWorkflowsOperations operations, string resourceGroupName, string workflowName)
 {
     return(operations.GetAsync(resourceGroupName, workflowName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Regenerates the callback URL access key for request triggers.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='keyType'>
 /// The key type. Possible values include: 'NotSpecified', 'Primary',
 /// 'Secondary'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task RegenerateAccessKeyAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, KeyType?keyType = default(KeyType?), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.RegenerateAccessKeyWithHttpMessagesAsync(resourceGroupName, workflowName, keyType, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #12
0
 /// <summary>
 /// Updates a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='workflow'>
 /// The workflow.
 /// </param>
 public static Workflow Update(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow workflow)
 {
     return(operations.UpdateAsync(resourceGroupName, workflowName, workflow).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Enables a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task EnableAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.EnableWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #14
0
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </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 <Workflow> ListByResourceGroupNext(this IWorkflowsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Example #15
0
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Workflow> ListByResourceGroup(this IWorkflowsOperations operations, string resourceGroupName, ODataQuery <WorkflowFilter> odataQuery = default(ODataQuery <WorkflowFilter>))
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Validates the workflow definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='location'>
 /// The workflow location.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='workflow'>
 /// The workflow definition.
 /// </param>
 public static void Validate(this IWorkflowsOperations operations, string resourceGroupName, string location, string workflowName, Workflow workflow)
 {
     Task.Factory.StartNew(s => ((IWorkflowsOperations)s).ValidateAsync(resourceGroupName, location, workflowName, workflow), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Example #17
0
 /// <summary>
 /// Validates the workflow definition.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='location'>
 /// The workflow location.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='workflow'>
 /// The workflow definition.
 /// </param>
 public static void ValidateByLocation(this IWorkflowsOperations operations, string resourceGroupName, string location, string workflowName, Workflow workflow)
 {
     operations.ValidateByLocationAsync(resourceGroupName, location, workflowName, workflow).GetAwaiter().GetResult();
 }
Example #18
0
 /// <summary>
 /// Disables a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 public static void Disable(this IWorkflowsOperations operations, string resourceGroupName, string workflowName)
 {
     operations.DisableAsync(resourceGroupName, workflowName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Workflow> ListByResourceGroup(this IWorkflowsOperations operations, string resourceGroupName, ODataQuery <WorkflowFilter> odataQuery = default(ODataQuery <WorkflowFilter>))
 {
     return(Task.Factory.StartNew(s => ((IWorkflowsOperations)s).ListByResourceGroupAsync(resourceGroupName, odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #20
0
 /// <summary>
 /// Moves an existing workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='move'>
 /// The workflow to move.
 /// </param>
 public static void Move(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow move)
 {
     operations.MoveAsync(resourceGroupName, workflowName, move).GetAwaiter().GetResult();
 }
Example #21
0
 /// <summary>
 /// Gets an OpenAPI definition for the workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 public static object ListSwagger(this IWorkflowsOperations operations, string resourceGroupName, string workflowName)
 {
     return(operations.ListSwaggerAsync(resourceGroupName, workflowName).GetAwaiter().GetResult());
 }
Example #22
0
 /// <summary>
 /// Gets a list of workflows by subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Workflow> ListBySubscription(this IWorkflowsOperations operations, ODataQuery <WorkflowFilter> odataQuery = default(ODataQuery <WorkflowFilter>))
 {
     return(operations.ListBySubscriptionAsync(odataQuery).GetAwaiter().GetResult());
 }
Example #23
0
 /// <summary>
 /// Get the workflow callback Url.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='listCallbackUrl'>
 /// Which callback url to list.
 /// </param>
 public static WorkflowTriggerCallbackUrl ListCallbackUrl(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl)
 {
     return(operations.ListCallbackUrlAsync(resourceGroupName, workflowName, listCallbackUrl).GetAwaiter().GetResult());
 }
Example #24
0
 /// <summary>
 /// Generates the upgraded definition for a workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters for generating an upgraded definition.
 /// </param>
 public static object GenerateUpgradedDefinition(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GenerateUpgradedDefinitionParameters parameters)
 {
     return(operations.GenerateUpgradedDefinitionAsync(resourceGroupName, workflowName, parameters).GetAwaiter().GetResult());
 }
Example #25
0
 /// <summary>
 /// Get a Workflow List
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Workflow> > ListByStorageSyncServiceAsync(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of workflows by resource group.
 /// </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 <Workflow> ListByResourceGroupNext(this IWorkflowsOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((IWorkflowsOperations)s).ListByResourceGroupNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #27
0
 /// <summary>
 /// Get a Workflow List
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 public static IEnumerable <Workflow> ListByStorageSyncService(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName)
 {
     return(operations.ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult());
 }
Example #28
0
 /// <summary>
 /// Regenerates the callback URL access key for request triggers.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='keyType'>
 /// The access key type.
 /// </param>
 public static void RegenerateAccessKey(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, RegenerateActionParameter keyType)
 {
     operations.RegenerateAccessKeyAsync(resourceGroupName, workflowName, keyType).GetAwaiter().GetResult();
 }
Example #29
0
 /// <summary>
 /// Get Workflows resource
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='storageSyncServiceName'>
 /// Name of Storage Sync Service resource.
 /// </param>
 /// <param name='workflowId'>
 /// workflow Id
 /// </param>
 public static Workflow Get(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName, string workflowId)
 {
     return(operations.GetAsync(resourceGroupName, storageSyncServiceName, workflowId).GetAwaiter().GetResult());
 }
Example #30
0
 /// <summary>
 /// Validates the workflow.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='workflowName'>
 /// The workflow name.
 /// </param>
 /// <param name='validate'>
 /// The workflow.
 /// </param>
 public static void ValidateByResourceGroup(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow validate)
 {
     operations.ValidateByResourceGroupAsync(resourceGroupName, workflowName, validate).GetAwaiter().GetResult();
 }