Enables a workflow.

 @param resource_group_name [String] The resource group name.
 @param workflow_name [String] The workflow name.
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.
960088
def enable(resource_group_name, workflow_name, custom_headers:nil)
      response = enable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
      nil
    end
27822
public static base_response enable(nitro_service client, nspbr resource) throws Exception {
		nspbr enableresource = new nspbr();
		enableresource.name = resource.name;
		return enableresource.perform_operation(client,"enable");
	}
441930
public Observable<Void> enableAsync(String resourceGroupName, String workflowName) {
        return enableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1<ServiceResponse<Void>, Void>() {
            @Override
            public Void call(ServiceResponse<Void> response) {
                return response.body();
            }
        });
    }
1041966
def add_parameter_to_group(self, parameter, group_name):
        
        groups = self.metadata \
            .setdefault("AWS::CloudFormation::Interface", {}) \
            .setdefault("ParameterGroups", [])

        if isinstance(parameter, BaseAWSObject):
            parameter = parameter.title

        # Check if group_name already exists
        existing_group = None
        for group in groups:
            if group["Label"]["default"] == group_name:
                existing_group = group
                break

        if existing_group is None:
            existing_group = {
                "Label": {"default": group_name},
                "Parameters": [],
            }
            groups.append(existing_group)

        existing_group["Parameters"].append(parameter)

        return group_name
1133496
public static base_response enable(nitro_service client) throws Exception {
		reporting enableresource = new reporting();
		return enableresource.perform_operation(client,"enable");
	}
499281
public function registerTasks(Workflow $workflow, Deployment $deployment)
    {
        parent::registerTasks($workflow, $deployment);

        $this->checkIfMandatoryOptionsExist();
        $this->buildConfiguration();
        $this->defineTasks($workflow, $deployment);

        if ($this->getOption('enableTests') !== false) {
            $workflow
                ->addTask([
                    UnitTestTask::class,
                    FunctionalTestTask::class
                ], 'test', $this);
        }

        $workflow->addTask([
                'TYPO3\\Surf\\DefinedTask\\CreateZipDistributionTask',
                'TYPO3\\Surf\\DefinedTask\\CreateTarGzDistributionTask',
                'TYPO3\\Surf\\DefinedTask\\CreateTarBz2DistributionTask',
            ], 'cleanup', $this);

        if ($this->hasOption('enableSourceforgeUpload') && $this->getOption('enableSourceforgeUpload') === true) {
            $workflow->addTask(SourceforgeUploadTask::class, 'cleanup', $this);
        }
        if ($this->hasOption('releaseHost')) {
            $workflow->addTask(PrepareReleaseTask::class, 'initialize', $this);
            $workflow->addTask(ReleaseTask::class, 'cleanup', $this);
        }
        if ($this->hasOption('releaseHost') && $this->hasOption('enableSourceforgeUpload') && $this->getOption('enableSourceforgeUpload') === true) {
            $workflow->addTask(AddDownloadTask::class, 'cleanup', $this);
        }
        if ($this->hasOption('createTags') && $this->getOption('createTags') === true) {
            $workflow->addTask(TagTask::class, 'cleanup', $this);
            if ($this->hasOption('TYPO3\\Surf\\DefinedTask\\Git\\PushTagsTask') && $this->getOption('TYPO3\\Surf\\DefinedTask\\Git\\PushTagsTask') === true) {
                $workflow->afterTask(TagTask::class, 'TYPO3\\Surf\\DefinedTask\\Git\\PushTagsTask', $this);
            }
        }

        $workflow->removeTask(MigrateTask::class);
    }
744732
public Observable<WorkflowInner> getByResourceGroupAsync(String resourceGroupName, String workflowName) {
        return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1<ServiceResponse<WorkflowInner>, WorkflowInner>() {
            @Override
            public WorkflowInner call(ServiceResponse<WorkflowInner> response) {
                return response.body();
            }
        });
    }
591422
def _build_global_workflow(json_spec, args):
    
    # First determine in which regions the global workflow needs to be available
    enabled_regions = _get_validated_enabled_regions(json_spec, args.region)

    # Verify all the stages are also enabled in these regions
    # TODO: Add support for dx building multi-region global workflows with applets
    _assert_executable_regions_match(enabled_regions, json_spec)

    workflows_by_region, projects_by_region = {}, {}  # IDs by region
    try:
        # prepare "regionalOptions" field for the globalworkflow/new input
        workflows_by_region, projects_by_region = \
            _build_underlying_workflows(enabled_regions, json_spec, args)
        regional_options = {}
        for region, workflow_id in workflows_by_region.items():
            regional_options[region] = {'workflow': workflow_id}
        json_spec.update({'regionalOptions': regional_options})

        # leave only fields that are actually used to build the workflow
        gwf_provided_keys = GLOBALWF_SUPPORTED_KEYS.intersection(set(json_spec.keys()))
        gwf_final_json = dict((k, v) for k, v in json_spec.items() if k in gwf_provided_keys)

        # we don't want to print the whole documentation to the screen so we'll remove these fields
        print_spec = copy.deepcopy(gwf_final_json)
        if "description" in gwf_final_json:
            del print_spec["description"]
        if "developerNotes" in gwf_final_json:
            del print_spec["developerNotes"]
        logger.info("Will create global workflow with spec: {}".format(json.dumps(print_spec)))

        # Create a new global workflow version on the platform
        global_workflow_id = dxpy.api.global_workflow_new(gwf_final_json)["id"]

        logger.info("Uploaded global workflow {n}/{v} successfully".format(n=gwf_final_json["name"],
                                                                           v=gwf_final_json["version"]))
        logger.info("You can publish this workflow with:")
        logger.info("  dx publish {n}/{v}".format(n=gwf_final_json["name"],
                                                  v=gwf_final_json["version"]))
    finally:
        # Clean up
        if projects_by_region:
            dxpy.executable_builder.delete_temporary_projects(projects_by_region.values())

    # Set any additional fields on the created workflow
    try:
        _set_categories_on_workflow(global_workflow_id, gwf_final_json.get("categories", []))
    except:
        logger.warn(
            "The workflow {n}/{v} was created but setting categories failed".format(n=gwf_final_json['name'],
                                                                                    v=gwf_final_json['version']))
        raise

    return global_workflow_id
678774
private void validateClusterNameOfWorkflowInstance( long woinRefNum ){
        WorkflowInstance woin = workflowInstanceService.find( woinRefNum );
        String clusterName = config.getClusterName();
        if( !ObjectUtils.equals( clusterName, woin.getClusterName() ) ){
            throw new IllegalArgumentException( "The workflow instance " + woinRefNum + " is not executed by this cluster " + clusterName );
        }
    }
1028263
def delete(resource_group_name, policy_name, custom_headers:nil)
      response = delete_async(resource_group_name, policy_name, custom_headers:custom_headers).value!
      nil
    end
282229
def _build_underlying_workflows(enabled_regions, json_spec, args):
    
    projects_by_region = _create_temporary_projects(enabled_regions, args)
    workflows_by_region = {}

    try:
        for region, project in projects_by_region.items():
            json_spec['project'] = project
            workflow_id = _build_regular_workflow(json_spec)
            logger.debug("Created workflow " + workflow_id + " successfully")
            workflows_by_region[region] = workflow_id
    except:
        # Clean up
        if projects_by_region:
            dxpy.executable_builder.delete_temporary_projects(projects_by_region.values())
        raise

    return workflows_by_region, projects_by_region
1073735
public void registerWorkflowDef(WorkflowDef workflowDef) {
        Preconditions.checkNotNull(workflowDef, "Worfklow definition cannot be null");
        stub.createWorkflow(
                MetadataServicePb.CreateWorkflowRequest.newBuilder()
                        .setWorkflow(protoMapper.toProto(workflowDef))
                        .build()
        );
    }
26070
def sharing?(permission_template:)
        wf = workflow(permission_template: permission_template)
        return false unless wf
        wf.allows_access_grant?
      end
854252
public static base_response enable(nitro_service client, String servicegroupname) throws Exception {
		servicegroup enableresource = new servicegroup();
		enableresource.servicegroupname = servicegroupname;
		return enableresource.perform_operation(client,"enable");
	}
829090
def begin_delete(resource_group_name, image_name, custom_headers:nil)
      response = begin_delete_async(resource_group_name, image_name, custom_headers:custom_headers).value!
      nil
    end
282036
def delete_by_resource_group_name(resource_group_name, budget_name, custom_headers:nil)
      response = delete_by_resource_group_name_async(resource_group_name, budget_name, custom_headers:custom_headers).value!
      nil
    end
1205927
public void pauseWorkflow(String workflowId) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        stub.pauseWorkflow(WorkflowServicePb.PauseWorkflowRequest.newBuilder()
                .setWorkflowId(workflowId)
                .build()
        );
    }