Listes déclencheurs.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers?api-version=2018-06-01
Paramètres URI
Nom |
Dans |
Obligatoire |
Type |
Description |
factoryName
|
path |
True
|
string
|
Nom de la fabrique.
Modèle d’expression régulière: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$
|
resourceGroupName
|
path |
True
|
string
|
Nom du groupe de ressources.
Modèle d’expression régulière: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
Identificateur de l’abonnement.
|
api-version
|
query |
True
|
string
|
Version de l'API.
|
Réponses
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory.
Type:
oauth2
Flux:
implicit
URL d’autorisation:
https://login.microsoftonline.com/common/oauth2/authorize
Étendues
Nom |
Description |
user_impersonation
|
Emprunter l’identité de votre compte d’utilisateur
|
Exemples
Triggers_ListByFactory
Exemple de requête
GET https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers?api-version=2018-06-01
/**
* Samples for Triggers ListByFactory.
*/
public final class Main {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/
* Triggers_ListByFactory.json
*/
/**
* Sample code: Triggers_ListByFactory.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void triggersListByFactory(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager.triggers().listByFactory("exampleResourceGroup", "exampleFactoryName",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.datafactory import DataFactoryManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-datafactory
# USAGE
python triggers_list_by_factory.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DataFactoryManagementClient(
credential=DefaultAzureCredential(),
subscription_id="12345678-1234-1234-1234-12345678abc",
)
response = client.triggers.list_by_factory(
resource_group_name="exampleResourceGroup",
factory_name="exampleFactoryName",
)
for item in response:
print(item)
# x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdatafactory_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v8"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f6f50c6388fd5836fa142384641b8353a99874ef/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json
func ExampleTriggersClient_NewListByFactoryPager() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdatafactory.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewTriggersClient().NewListByFactoryPager("exampleResourceGroup", "exampleFactoryName", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.TriggerListResponse = armdatafactory.TriggerListResponse{
// Value: []*armdatafactory.TriggerResource{
// {
// Name: to.Ptr("exampleTrigger"),
// Type: to.Ptr("Microsoft.DataFactory/factories/triggers"),
// Etag: to.Ptr("0a008ed4-0000-0000-0000-5b245c740000"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger"),
// Properties: &armdatafactory.ScheduleTrigger{
// Type: to.Ptr("ScheduleTrigger"),
// Description: to.Ptr("Example description"),
// RuntimeState: to.Ptr(armdatafactory.TriggerRuntimeStateStarted),
// Pipelines: []*armdatafactory.TriggerPipelineReference{
// {
// Parameters: map[string]any{
// "OutputBlobNameList": []any{
// "exampleoutput.csv",
// },
// },
// PipelineReference: &armdatafactory.PipelineReference{
// Type: to.Ptr(armdatafactory.PipelineReferenceTypePipelineReference),
// ReferenceName: to.Ptr("examplePipeline"),
// },
// }},
// TypeProperties: &armdatafactory.ScheduleTriggerTypeProperties{
// Recurrence: &armdatafactory.ScheduleTriggerRecurrence{
// EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t}()),
// Frequency: to.Ptr(armdatafactory.RecurrenceFrequencyMinute),
// Interval: to.Ptr[int32](4),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t}()),
// TimeZone: to.Ptr("UTC"),
// },
// },
// },
// }},
// }
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DataFactoryManagementClient } = require("@azure/arm-datafactory");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists triggers.
*
* @summary Lists triggers.
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json
*/
async function triggersListByFactory() {
const subscriptionId =
process.env["DATAFACTORY_SUBSCRIPTION_ID"] || "12345678-1234-1234-1234-12345678abc";
const resourceGroupName = process.env["DATAFACTORY_RESOURCE_GROUP"] || "exampleResourceGroup";
const factoryName = "exampleFactoryName";
const credential = new DefaultAzureCredential();
const client = new DataFactoryManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.triggers.listByFactory(resourceGroupName, factoryName)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.DataFactory;
using Azure.ResourceManager.DataFactory.Models;
// Generated from example definition: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_ListByFactory.json
// this example is just showing the usage of "Triggers_ListByFactory" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this DataFactoryResource created on azure
// for more information of creating DataFactoryResource, please refer to the document of DataFactoryResource
string subscriptionId = "12345678-1234-1234-1234-12345678abc";
string resourceGroupName = "exampleResourceGroup";
string factoryName = "exampleFactoryName";
ResourceIdentifier dataFactoryResourceId = DataFactoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, factoryName);
DataFactoryResource dataFactory = client.GetDataFactoryResource(dataFactoryResourceId);
// get the collection of this DataFactoryTriggerResource
DataFactoryTriggerCollection collection = dataFactory.GetDataFactoryTriggers();
// invoke the operation and iterate over the result
await foreach (DataFactoryTriggerResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
DataFactoryTriggerData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Exemple de réponse
Date: Sat, 16 Jun 2018 00:40:20 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-reads: 14986
x-ms-request-id: e474f8f8-b34f-4536-b059-ca740e6b44c3
x-ms-correlation-request-id: e474f8f8-b34f-4536-b059-ca740e6b44c3
{
"value": [
{
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleTrigger",
"name": "exampleTrigger",
"type": "Microsoft.DataFactory/factories/triggers",
"properties": {
"type": "ScheduleTrigger",
"typeProperties": {
"recurrence": {
"frequency": "Minute",
"interval": 4,
"startTime": "2018-06-16T00:39:14.905167Z",
"endTime": "2018-06-16T00:55:14.905167Z",
"timeZone": "UTC"
}
},
"pipelines": [
{
"pipelineReference": {
"referenceName": "examplePipeline",
"type": "PipelineReference"
},
"parameters": {
"OutputBlobNameList": [
"exampleoutput.csv"
]
}
}
],
"description": "Example description",
"runtimeState": "Started"
},
"etag": "0a008ed4-0000-0000-0000-5b245c740000"
}
]
}
Définitions
CloudError
Objet qui définit la structure d’une réponse d’erreur Azure Data Factory.
Nom |
Type |
Description |
error.code
|
string
|
Code d’erreur.
|
error.details
|
CloudError[]
|
Tableau avec des détails d’erreur supplémentaires.
|
error.message
|
string
|
Message d’erreur.
|
error.target
|
string
|
Nom/chemin de propriété dans la demande associée à l’erreur.
|
MultiplePipelineTrigger
Classe de base pour tous les déclencheurs qui prennent en charge un à plusieurs modèles pour le déclencheur vers le pipeline.
Nom |
Type |
Description |
annotations
|
object[]
|
Liste des balises qui peuvent être utilisées pour décrire le déclencheur.
|
description
|
string
|
Description du déclencheur.
|
pipelines
|
TriggerPipelineReference[]
|
Pipelines qui doivent être démarrés.
|
runtimeState
|
TriggerRuntimeState
|
Indique si le déclencheur est en cours d’exécution ou non. Mise à jour lorsque les API Start/Stop sont appelées sur le déclencheur.
|
type
|
string:
MultiplePipelineTrigger
|
Type de déclencher.
|
PipelineReference
Type de référence de pipeline.
Nom |
Type |
Description |
name
|
string
|
Nom de la référence.
|
referenceName
|
string
|
Nom du pipeline de référence.
|
type
|
enum:
PipelineReference
|
Type de référence de pipeline.
|
TriggerListResponse
Liste des ressources de déclencheur.
Nom |
Type |
Description |
nextLink
|
string
|
Lien vers la page de résultats suivante, s’il existe des résultats restants.
|
value
|
TriggerResource[]
|
Liste des déclencheurs.
|
TriggerPipelineReference
Pipeline qui doit être déclenché avec les paramètres donnés.
Nom |
Type |
Description |
parameters
|
object
|
Paramètres de pipeline.
|
pipelineReference
|
PipelineReference
|
Référence de pipeline.
|
TriggerResource
Type de ressource déclencheur.
Nom |
Type |
Description |
etag
|
string
|
Etag identifie les modifications apportées à la ressource.
|
id
|
string
|
Identificateur de ressource.
|
name
|
string
|
Nom de la ressource.
|
properties
|
Trigger:
MultiplePipelineTrigger
|
Propriétés du déclencheur.
|
type
|
string
|
Type de ressource.
|
TriggerRuntimeState
Énumère l’état possible des déclencheurs.
Nom |
Type |
Description |
Disabled
|
string
|
|
Started
|
string
|
|
Stopped
|
string
|
|