def build_list_versions_by_classification_rule_name_request( classification_rule_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Lists the rule versions of a classification rule. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param classification_rule_name: :type classification_rule_name: str :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "count": "long (optional)", "nextLink": "str (optional)", "value": [ { "kind": "ClassificationRule" } ] } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/classificationrules/{classificationRuleName}/versions') path_format_arguments = { 'classificationRuleName': _SERIALIZER.url("classification_rule_name", classification_rule_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_get_trigger_request( data_source_name, # type: str scan_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Gets trigger information. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param data_source_name: :type data_source_name: str :param scan_name: :type scan_name: str :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "properties": {} } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop( "template_url", '/datasources/{dataSourceName}/scans/{scanName}/triggers/default') path_format_arguments = { 'dataSourceName': _SERIALIZER.url("data_source_name", data_source_name, 'str'), 'scanName': _SERIALIZER.url("scan_name", scan_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_get_by_version_request( version, # type: int **kwargs # type: Any ): # type: (...) -> HttpRequest """Get a scan ruleset by version. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param version: :type version: int :keyword data_source_type: :paramtype data_source_type: str or ~azure.purview.scanning.models.DataSourceType :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "kind": "SystemScanRuleset" } """ data_source_type = kwargs.pop( 'data_source_type', None) # type: Optional[Union[str, "_models.DataSourceType"]] api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/systemScanRulesets/versions/{version}') path_format_arguments = { 'version': _SERIALIZER.url("version", version, 'int'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if data_source_type is not None: query_parameters['dataSourceType'] = _SERIALIZER.query( "data_source_type", data_source_type, 'str') query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_list_versions_by_data_source_request( **kwargs # type: Any ): # type: (...) -> HttpRequest """List system scan ruleset versions in Data catalog. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :keyword data_source_type: :paramtype data_source_type: str or ~azure.purview.scanning.models.DataSourceType :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "count": "long (optional)", "nextLink": "str (optional)", "value": [ { "kind": "SystemScanRuleset" } ] } """ data_source_type = kwargs.pop( 'data_source_type', None) # type: Optional[Union[str, "_models.DataSourceType"]] api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/systemScanRulesets/versions') # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if data_source_type is not None: query_parameters['dataSourceType'] = _SERIALIZER.query( "data_source_type", data_source_type, 'str') query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_delete_request( scan_ruleset_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Deletes a scan ruleset. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param scan_ruleset_name: :type scan_ruleset_name: str :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "kind": "ScanRuleset" } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/scanrulesets/{scanRulesetName}') path_format_arguments = { 'scanRulesetName': _SERIALIZER.url("scan_ruleset_name", scan_ruleset_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", url=url, params=query_parameters, headers=header_parameters, **kwargs )
def build_list_all_request( **kwargs # type: Any ): # type: (...) -> HttpRequest """List key vault connections in account. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "count": "long (optional)", "nextLink": "str (optional)", "value": [ { "properties": {} } ] } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/azureKeyVaults') # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_run_scan_request( data_source_name, # type: str scan_name, # type: str run_id, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Runs the scan. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param data_source_name: :type data_source_name: str :param scan_name: :type scan_name: str :param run_id: :type run_id: str :keyword scan_level: :paramtype scan_level: str or ~azure.purview.scanning.models.ScanLevelType :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 202 response_body == { "endTime": "datetime (optional)", "error": {}, "scanResultId": "str (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } """ scan_level = kwargs.pop( 'scan_level', None) # type: Optional[Union[str, "_models.ScanLevelType"]] api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop( "template_url", '/datasources/{dataSourceName}/scans/{scanName}/runs/{runId}') path_format_arguments = { 'dataSourceName': _SERIALIZER.url("data_source_name", data_source_name, 'str'), 'scanName': _SERIALIZER.url("scan_name", scan_name, 'str'), 'runId': _SERIALIZER.url("run_id", run_id, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if scan_level is not None: query_parameters['scanLevel'] = _SERIALIZER.query( "scan_level", scan_level, 'str') query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="PUT", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_list_scan_history_request( data_source_name, # type: str scan_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Lists the scan history of a scan. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param data_source_name: :type data_source_name: str :param scan_name: :type scan_name: str :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "count": "long (optional)", "nextLink": "str (optional)", "value": [ { "assetsClassified": "long (optional)", "assetsDiscovered": "long (optional)", "dataSourceType": "str (optional)", "diagnostics": {}, "endTime": "datetime (optional)", "error": {}, "errorMessage": "str (optional)", "id": "str (optional)", "parentId": "str (optional)", "pipelineStartTime": "datetime (optional)", "queuedTime": "datetime (optional)", "resourceId": "str (optional)", "runType": "str (optional)", "scanLevelType": "str (optional)", "scanRulesetType": "str (optional)", "scanRulesetVersion": "int (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } ] } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/datasources/{dataSourceName}/scans/{scanName}/runs') path_format_arguments = { 'dataSourceName': _SERIALIZER.url("data_source_name", data_source_name, 'str'), 'scanName': _SERIALIZER.url("scan_name", scan_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_create_or_update_request( classification_rule_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Creates or Updates a classification rule. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param classification_rule_name: :type classification_rule_name: str :keyword json: :paramtype json: Any :keyword content: :paramtype content: Any :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # kind template as part of your input body kind = 'CustomClassificationRule' or 'SystemClassificationRule' # JSON input template you can fill out and use as your `json` input. json = { "kind": "ClassificationRule" } # response body for status code(s): 200, 201 response_body == { "kind": "ClassificationRule" } """ content_type = kwargs.pop("content_type", None) api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/classificationrules/{classificationRuleName}') path_format_arguments = { 'classificationRuleName': _SERIALIZER.url("classification_rule_name", classification_rule_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header( "content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="PUT", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_tag_classification_version_request( classification_rule_name, # type: str classification_rule_version, # type: int **kwargs # type: Any ): # type: (...) -> HttpRequest """Sets Classification Action on a specific classification rule version. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param classification_rule_name: :type classification_rule_name: str :param classification_rule_version: :type classification_rule_version: int :keyword action: :paramtype action: str or ~azure.purview.scanning.models.ClassificationAction :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 202 response_body == { "endTime": "datetime (optional)", "error": {}, "scanResultId": "str (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } """ action = kwargs.pop( 'action') # type: Union[str, "_models.ClassificationAction"] api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop( "template_url", '/classificationrules/{classificationRuleName}/versions/{classificationRuleVersion}/:tag' ) path_format_arguments = { 'classificationRuleName': _SERIALIZER.url("classification_rule_name", classification_rule_name, 'str'), 'classificationRuleVersion': _SERIALIZER.url("classification_rule_version", classification_rule_version, 'int'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['action'] = _SERIALIZER.query("action", action, 'str') query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="POST", url=url, params=query_parameters, headers=header_parameters, **kwargs)
def build_create_or_update_request( data_source_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Creates or Updates a data source. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param data_source_name: :type data_source_name: str :keyword json: :paramtype json: Any :keyword content: :paramtype content: Any :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # kind template as part of your input body kind = 'AdlsGen1DataSource' or 'AdlsGen2DataSource' or 'AmazonAccountDataSource' or 'AmazonPostgreSqlDataSource' or 'AmazonS3DataSource' or 'AmazonSqlDataSource' or 'AzureCosmosDbDataSource' or 'AzureDataExplorerDataSource' or 'AzureFileServiceDataSource' or 'AzureMySqlDataSource' or 'AzurePostgreSqlDataSource' or 'AzureResourceGroupDataSource' or 'AzureSqlDataWarehouseDataSource' or 'AzureSqlDatabaseDataSource' or 'AzureSqlDatabaseManagedInstanceDataSource' or 'AzureStorageDataSource' or 'AzureSubscriptionDataSource' or 'AzureSynapseDataSource' or 'AzureSynapseWorkspaceDataSource' or 'OracleDataSource' or 'PowerBIDataSource' or 'SapEccDataSource' or 'SapS4HanaDataSource' or 'SqlServerDatabaseDataSource' or 'TeradataDataSource' # JSON input template you can fill out and use as your `json` input. json = { "kind": "DataSource", "scans": [ { "kind": "Scan", "scanResults": [ { "assetsClassified": "long (optional)", "assetsDiscovered": "long (optional)", "dataSourceType": "str (optional)", "diagnostics": {}, "endTime": "datetime (optional)", "error": {}, "errorMessage": "str (optional)", "id": "str (optional)", "parentId": "str (optional)", "pipelineStartTime": "datetime (optional)", "queuedTime": "datetime (optional)", "resourceId": "str (optional)", "runType": "str (optional)", "scanLevelType": "str (optional)", "scanRulesetType": "str (optional)", "scanRulesetVersion": "int (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } ] } ] } # response body for status code(s): 200, 201 response_body == { "kind": "DataSource", "scans": [ { "kind": "Scan", "scanResults": [ { "assetsClassified": "long (optional)", "assetsDiscovered": "long (optional)", "dataSourceType": "str (optional)", "diagnostics": {}, "endTime": "datetime (optional)", "error": {}, "errorMessage": "str (optional)", "id": "str (optional)", "parentId": "str (optional)", "pipelineStartTime": "datetime (optional)", "queuedTime": "datetime (optional)", "resourceId": "str (optional)", "runType": "str (optional)", "scanLevelType": "str (optional)", "scanRulesetType": "str (optional)", "scanRulesetVersion": "int (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } ] } ] } """ content_type = kwargs.pop("content_type", None) api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/datasources/{dataSourceName}') path_format_arguments = { 'dataSourceName': _SERIALIZER.url("data_source_name", data_source_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", url=url, params=query_parameters, headers=header_parameters, **kwargs )
def build_create_or_update_request( scan_ruleset_name, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Creates or Updates a scan ruleset. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param scan_ruleset_name: :type scan_ruleset_name: str :keyword json: :paramtype json: Any :keyword content: :paramtype content: Any :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # kind template as part of your input body kind = 'AdlsGen1ScanRuleset' or 'AdlsGen2ScanRuleset' or 'AmazonAccountScanRuleset' or 'AmazonPostgreSqlScanRuleset' or 'AmazonS3ScanRuleset' or 'AmazonSqlScanRuleset' or 'AzureCosmosDbScanRuleset' or 'AzureDataExplorerScanRuleset' or 'AzureFileServiceScanRuleset' or 'AzureMySqlScanRuleset' or 'AzurePostgreSqlScanRuleset' or 'AzureResourceGroupScanRuleset' or 'AzureSqlDataWarehouseScanRuleset' or 'AzureSqlDatabaseScanRuleset' or 'AzureSqlDatabaseManagedInstanceScanRuleset' or 'AzureStorageScanRuleset' or 'AzureSubscriptionScanRuleset' or 'AzureSynapseScanRuleset' or 'AzureSynapseWorkspaceScanRuleset' or 'OracleScanRuleset' or 'PowerBIScanRuleset' or 'SapEccScanRuleset' or 'SapS4HanaScanRuleset' or 'SqlServerDatabaseScanRuleset' or 'TeradataScanRuleset' # JSON input template you can fill out and use as your `json` input. json = { "kind": "ScanRuleset" } # response body for status code(s): 200, 201 response_body == { "kind": "ScanRuleset" } """ content_type = kwargs.pop("content_type", None) api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/scanrulesets/{scanRulesetName}') path_format_arguments = { 'scanRulesetName': _SERIALIZER.url("scan_ruleset_name", scan_ruleset_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", url=url, params=query_parameters, headers=header_parameters, **kwargs )
def build_create_trigger_request( data_source_name: str, scan_name: str, *, json: Any = None, content: Any = None, **kwargs: Any ) -> HttpRequest: """Creates an instance of a trigger. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :param data_source_name: :type data_source_name: str :param scan_name: :type scan_name: str :keyword json: :paramtype json: Any :keyword content: :paramtype content: Any :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # JSON input template you can fill out and use as your `json` input. json = { "properties": {} } # response body for status code(s): 200, 201 response_body == { "properties": {} } """ content_type = kwargs.pop("content_type", None) api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/datasources/{dataSourceName}/scans/{scanName}/triggers/default') path_format_arguments = { 'dataSourceName': _SERIALIZER.url("data_source_name", data_source_name, 'str'), 'scanName': _SERIALIZER.url("scan_name", scan_name, 'str'), } url = _format_url_section(url, **path_format_arguments) # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", url=url, params=query_parameters, headers=header_parameters, json=json, content=content, **kwargs )
def build_list_all_request(**kwargs: Any) -> HttpRequest: """List data sources in Data catalog. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. :return: Returns an :class:`~azure.purview.scanning.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.purview.scanning.core.rest.HttpRequest Example: .. code-block:: python # response body for status code(s): 200 response_body == { "count": "long (optional)", "nextLink": "str (optional)", "value": [ { "kind": "DataSource", "scans": [ { "kind": "Scan", "scanResults": [ { "assetsClassified": "long (optional)", "assetsDiscovered": "long (optional)", "dataSourceType": "str (optional)", "diagnostics": {}, "endTime": "datetime (optional)", "error": {}, "errorMessage": "str (optional)", "id": "str (optional)", "parentId": "str (optional)", "pipelineStartTime": "datetime (optional)", "queuedTime": "datetime (optional)", "resourceId": "str (optional)", "runType": "str (optional)", "scanLevelType": "str (optional)", "scanRulesetType": "str (optional)", "scanRulesetVersion": "int (optional)", "startTime": "datetime (optional)", "status": "str (optional)" } ] } ] } ] } """ api_version = "2018-12-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/datasources') # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] query_parameters['api-version'] = _SERIALIZER.query( "api_version", api_version, 'str') # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest(method="GET", url=url, params=query_parameters, headers=header_parameters, **kwargs)