# Azure Tasks
This module contains a collection of tasks for interacting with Azure resources.
# BlobStorageDownload
class
prefect.tasks.azure.blobstorage.BlobStorageDownload
(azure_credentials_secret="AZ_CONNECTION_STRING", container=None, **kwargs)[source]Task for downloading data from an Blob Storage container and returning it as a string. Note that all initialization arguments can optionally be provided or overwritten at runtime.
Args:
azure_credentials_secret (str, optional)
: the name of the Prefect Secret that stores your Azure credentials; this Secret must be an Azure connection stringcontainer (str, optional)
: the name of the Azure Blob Storage to download from**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.azure.blobstorage.BlobStorageDownload.run (blob_name, azure_credentials_secret="AZ_CONNECTION_STRING", container=None)[source] |
Task run method.
|
# BlobStorageUpload
class
prefect.tasks.azure.blobstorage.BlobStorageUpload
(azure_credentials_secret="AZ_CONNECTION_STRING", container=None, **kwargs)[source]Task for uploading string data (e.g., a JSON string) to an Azure Blob Storage container. Note that all initialization arguments can optionally be provided or overwritten at runtime.
Args:
azure_credentials_secret (str, optional)
: the name of the Prefect Secret that stores your Azure credentials; this Secret must be an Azure connection stringcontainer (str, optional)
: the name of the Azure Blob Storage to upload to**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.azure.blobstorage.BlobStorageUpload.run (data, blob_name=None, azure_credentials_secret="AZ_CONNECTION_STRING", container=None)[source] |
Task run method.
|
# CosmosDBCreateItem
class
prefect.tasks.azure.cosmosdb.CosmosDBCreateItem
(url=None, database_or_container_link=None, item=None, azure_credentials_secret="AZ_CREDENTIALS", options=None, **kwargs)[source]Task for creating an item in a Azure Cosmos database. Note that all initialization arguments can optionally be provided or overwritten at runtime.
Args:
url (str, optional)
: The url to the database.database_or_container_link (str, optional)
: link to the database or container.item (dict, optional)
: the item to createazure_credentials_secret (str, optional)
: the name of the Prefect Secret that stores your Azure credentials; this Secret must be JSON string with the keyAZ_COSMOS_AUTH
. The value should be dictionary containingmasterKey
orresourceTokens
, where themasterKey
value is the default authorization key to use to create the client, andresourceTokens
value is the alternative authorization key.options (dict, optional)
: options to be passed to theazure.cosmos.cosmos_client.CosmosClient.CreateItem
method.**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.azure.cosmosdb.CosmosDBCreateItem.run (url=None, database_or_container_link=None, item=None, azure_credentials_secret="AZ_CREDENTIALS", options=None)[source] |
Task run method.
|
# CosmosDBReadItems
class
prefect.tasks.azure.cosmosdb.CosmosDBReadItems
(url=None, document_or_container_link=None, azure_credentials_secret="AZ_CREDENTIALS", options=None, **kwargs)[source]Task for reading items from a Azure Cosmos database. Note that all initialization arguments can optionally be provided or overwritten at runtime.
Args:
url (str, optional)
: The url to the database.document_or_container_link (str, optional)
: link to a document or container. If a document link is provided, the document in question is returned, otherwise all docuements are returned.azure_credentials_secret (str, optional)
: the name of the Prefect Secret that stores your Azure credentials; this Secret must be JSON string with the keyAZ_COSMOS_AUTH
. The value should be dictionary containingmasterKey
orresourceTokens
, where themasterKey
value is the default authorization key to use to create the client, andresourceTokens
value is the alternative authorization key.options (dict, optional)
: options to be passed to theazure.cosmos.cosmos_client.CosmosClient.ReadItem
orReadItems
method.**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.azure.cosmosdb.CosmosDBReadItems.run (url=None, document_or_container_link=None, azure_credentials_secret="AZ_CREDENTIALS", options=None)[source] |
Task run method.
|
# CosmosDBQueryItems
class
prefect.tasks.azure.cosmosdb.CosmosDBQueryItems
(url=None, database_or_container_link=None, query=None, azure_credentials_secret="AZ_CREDENTIALS", options=None, partition_key=None, **kwargs)[source]Task for creating an item in a Azure Cosmos database. Note that all initialization arguments can optionally be provided or overwritten at runtime.
Args:
url (str, optional)
: The url to the database.database_or_container_link (str, optional)
: link to the database or container.query (dict, optional)
: the query to runazure_credentials_secret (str, optional)
: the name of the Prefect Secret that stores your Azure credentials; this Secret must be JSON string with the keyAZ_COSMOS_AUTH
. The value should be dictionary containingmasterKey
orresourceTokens
, where themasterKey
value is the default authorization key to use to create the client, andresourceTokens
value is the alternative authorization key.options (dict, optional)
: options to be passed to theazure.cosmos.cosmos_client.CosmosClient.QueryItems
method.partition_key (str, None)
: Partition key for the query.**kwargs (dict, optional)
: additional keyword arguments to pass to the Task constructor
methods: |
---|
prefect.tasks.azure.cosmosdb.CosmosDBQueryItems.run (url=None, database_or_container_link=None, query=None, azure_credentials_secret="AZ_CREDENTIALS", options=None, partition_key=None)[source] |
Task run method.
|
This documentation was auto-generated from commit n/a
on July 1, 2021 at 18:35 UTC