az_datafactory(
name,
config,
factory_name,
resource,
resource_group,
resource_name,
template
)
A rule for setting basic properties for other rules.
Attributes | |
---|---|
name |
Unique name for this rule. |
config |
Label of |
factory_name |
The factory name. This field supports stamp variables. |
resource |
The type of the object in the DataFactory. Supported values are:
|
resource_group |
Name of resource group. This field supports stamp variables. |
resource_name |
The resource name (pipeline or trigger). |
template |
This template depends on the type of object in the DataFactory.
I.e: If you define the |
load("@rules_microsoft_azure//az:defs.bzl", "az_config", "az_datafactory")
genrule(
name = "template",
outs = ["template.json"],
cmd = """
echo -e '{"properties": {"activities": [], "variables": {},"annotations": []}}' > \"$@\"
"""
)
az_config(
name = "config",
debug = True,
subscription = "dev",
verbose = True,
)
az_datafactory(
name = "foo",
config = ":config",
factory_name = "foo-factory",
resource = "pipeline",
resource_group = "foo-factory-rg",
resource_name = "foo",
template = ":template",
)
The az_datafactory
rules expose a collection of actions. We will follow the :foo
target from the example above.
Build creates all the constituent elements and makes the model available like {name}.substituted.json
.
bazel build :dev
NOTE: If the resource
attribute is defined as a pipeline
, the folder property will contain the destination bazel directory.
E.g:
{
"properties": {
"folder": {
"name": "bazel/<workspace_name>/path/to/target"
}
}
}
You can "resolve" your resource template
by running:
bazel run :foo
The resolved template
will be printed to STDOUT
.
Users can create or update objects by running:
bazel run :foo.create
This deploys the resolved template.
Users can delete objects by running:
bazel run :foo.create
Users can get objects by running:
bazel run :foo.show
NOTE: Only available for the trigger
resource.
Users can start a trigger by running:
bazel run :foo.start
NOTE: Only available for the trigger
resource.
Users can stop a trigger by running:
bazel run :foo.stop