Gatilhos de consulta.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/querytriggers?api-version=2018-06-01
Parâmetros de URI
Nome |
Em |
Obrigatório |
Tipo |
Description |
factoryName
|
path |
True
|
string
|
O nome da fábrica.
Padrão Regex: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos.
Padrão Regex: ^[-\w\._\(\)]+$
|
subscriptionId
|
path |
True
|
string
|
O identificador da assinatura.
|
api-version
|
query |
True
|
string
|
A versão da API.
|
Corpo da solicitação
Nome |
Tipo |
Description |
continuationToken
|
string
|
O token de continuação para obter a próxima página de resultados. Nulo para a primeira página.
|
parentTriggerName
|
string
|
O nome do pai TumblingWindowTrigger para obter os gatilhos de nova execução filho
|
Respostas
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Tipo:
oauth2
Flow:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Escopos
Nome |
Description |
user_impersonation
|
representar sua conta de usuário
|
Exemplos
Triggers_QueryByFactory
Solicitação de exemplo
POST https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/querytriggers?api-version=2018-06-01
{
"parentTriggerName": "exampleTrigger"
}
import com.azure.resourcemanager.datafactory.models.TriggerFilterParameters;
/**
* Samples for Triggers QueryByFactory.
*/
public final class Main {
/*
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/
* Triggers_QueryByFactory.json
*/
/**
* Sample code: Triggers_QueryByFactory.
*
* @param manager Entry point to DataFactoryManager.
*/
public static void triggersQueryByFactory(com.azure.resourcemanager.datafactory.DataFactoryManager manager) {
manager.triggers().queryByFactoryWithResponse("exampleResourceGroup", "exampleFactoryName",
new TriggerFilterParameters().withParentTriggerName("exampleTrigger"), 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_query_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.query_by_factory(
resource_group_name="exampleResourceGroup",
factory_name="exampleFactoryName",
filter_parameters={"parentTriggerName": "exampleTrigger"},
)
print(response)
# x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/datafactory/armdatafactory/v9"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ab04533261eff228f28e08900445d0edef3eb70c/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json
func ExampleTriggersClient_QueryByFactory() {
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)
}
res, err := clientFactory.NewTriggersClient().QueryByFactory(ctx, "exampleResourceGroup", "exampleFactoryName", armdatafactory.TriggerFilterParameters{
ParentTriggerName: to.Ptr("exampleTrigger"),
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.TriggerQueryResponse = armdatafactory.TriggerQueryResponse{
// Value: []*armdatafactory.TriggerResource{
// {
// Name: to.Ptr("exampleRerunTrigger"),
// Type: to.Ptr("Microsoft.DataFactory/factories/triggers"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/triggers/exampleRerunTrigger"),
// Properties: &armdatafactory.RerunTumblingWindowTrigger{
// Type: to.Ptr("RerunTumblingWindowTrigger"),
// Description: to.Ptr("Example description"),
// TypeProperties: &armdatafactory.RerunTumblingWindowTriggerTypeProperties{
// ParentTrigger: "exampleTrigger",
// RequestedEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:55:14.905Z"); return t}()),
// RequestedStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-16T00:39:14.905Z"); return t}()),
// RerunConcurrency: to.Ptr[int32](4),
// },
// },
// }},
// }
}
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 Query triggers.
*
* @summary Query triggers.
* x-ms-original-file: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json
*/
async function triggersQueryByFactory() {
const subscriptionId =
process.env["DATAFACTORY_SUBSCRIPTION_ID"] || "12345678-1234-1234-1234-12345678abc";
const resourceGroupName = process.env["DATAFACTORY_RESOURCE_GROUP"] || "exampleResourceGroup";
const factoryName = "exampleFactoryName";
const filterParameters = {
parentTriggerName: "exampleTrigger",
};
const credential = new DefaultAzureCredential();
const client = new DataFactoryManagementClient(credential, subscriptionId);
const result = await client.triggers.queryByFactory(
resourceGroupName,
factoryName,
filterParameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.Expressions.DataFactory;
using Azure.Identity;
using Azure.ResourceManager.DataFactory.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.DataFactory;
// Generated from example definition: specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/examples/Triggers_QueryByFactory.json
// this example is just showing the usage of "Triggers_QueryByFactory" 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);
// invoke the operation and iterate over the result
TriggerFilterContent content = new TriggerFilterContent()
{
ParentTriggerName = "exampleTrigger",
};
await foreach (DataFactoryTriggerResource item in dataFactory.GetTriggersAsync(content))
{
// 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
Resposta de exemplo
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/exampleRerunTrigger",
"name": "exampleRerunTrigger",
"type": "Microsoft.DataFactory/factories/triggers",
"properties": {
"type": "RerunTumblingWindowTrigger",
"typeProperties": {
"parentTrigger": "exampleTrigger",
"requestedStartTime": "2018-06-16T00:39:14.905167Z",
"requestedEndTime": "2018-06-16T00:55:14.905167Z",
"rerunConcurrency": 4
},
"description": "Example description"
}
}
]
}
Definições
CloudError
O objeto que define a estrutura de uma resposta de erro Azure Data Factory.
Nome |
Tipo |
Description |
error.code
|
string
|
Código do erro.
|
error.details
|
CloudError[]
|
Matriz com detalhes de erro adicionais.
|
error.message
|
string
|
Mensagem de erro.
|
error.target
|
string
|
Nome/caminho da propriedade na solicitação associada ao erro.
|
MultiplePipelineTrigger
Classe base para todos os gatilhos que dão suporte a um a muitos modelos para gatilho para pipeline.
Nome |
Tipo |
Description |
annotations
|
object[]
|
Lista de marcas que podem ser usadas para descrever o gatilho.
|
description
|
string
|
Descrição do gatilho.
|
pipelines
|
TriggerPipelineReference[]
|
Pipelines que precisam ser iniciados.
|
runtimeState
|
TriggerRuntimeState
|
Indica se o gatilho está em execução ou não. Atualizado quando as APIs Iniciar/Parar são chamadas no Gatilho.
|
type
|
string:
MultiplePipelineTrigger
|
Tipo de gatilho.
|
PipelineReference
Tipo de referência de pipeline.
Nome |
Tipo |
Description |
name
|
string
|
Nome da referência.
|
referenceName
|
string
|
Nome do pipeline de referência.
|
type
|
enum:
PipelineReference
|
Tipo de referência de pipeline.
|
TriggerFilterParameters
Parâmetros de consulta para gatilhos.
Nome |
Tipo |
Description |
continuationToken
|
string
|
O token de continuação para obter a próxima página de resultados. Nulo para a primeira página.
|
parentTriggerName
|
string
|
O nome do pai TumblingWindowTrigger para obter os gatilhos de nova execução filho
|
TriggerPipelineReference
Pipeline que precisa ser disparado com os parâmetros fornecidos.
Nome |
Tipo |
Description |
parameters
|
object
|
Parâmetros do pipeline.
|
pipelineReference
|
PipelineReference
|
Referência de pipeline.
|
TriggerQueryResponse
Uma consulta de gatilhos.
Nome |
Tipo |
Description |
continuationToken
|
string
|
O token de continuação para obter a próxima página de resultados, se houver resultados restantes, null caso contrário.
|
value
|
TriggerResource[]
|
Lista de gatilhos.
|
TriggerResource
Tipo de recurso de gatilho.
Nome |
Tipo |
Description |
etag
|
string
|
A Etag identifica a alteração no recurso.
|
id
|
string
|
O identificador do recurso.
|
name
|
string
|
O nome do recurso.
|
properties
|
Trigger:
MultiplePipelineTrigger
|
Propriedades do gatilho.
|
type
|
string
|
O tipo de recurso.
|
TriggerRuntimeState
Enumera o estado possível de Gatilhos.
Nome |
Tipo |
Description |
Disabled
|
string
|
|
Started
|
string
|
|
Stopped
|
string
|
|