Workflows 정의용 커넥터

Workflows 정의에 액세스하는 데 사용되는 기본 제공 함수를 정의하는 Workflows 커넥터입니다.

더 살펴보기

이 코드 샘플이 포함된 자세한 문서는 다음을 참조하세요.

코드 샘플

YAML

# This workflow demonstrates how to use the Workflows connector:
# Create, get, and then delete a workflow
# Expected output: "SUCCESS"
- init:
    assign:
      - project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
      - location: "us-central1"
      - workflow: "example-workflow"
- create_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.create
    args:
      parent: ${"projects/" + project + "/locations/" + location}
      workflowId: ${workflow}
      body:
        name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
        description: "An example workflow to create and delete using the Workflows connector"
        sourceContents: "- step:\n    next: end"
- get_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.get
    args:
      name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
- delete_workflow:
    call: googleapis.workflows.v1.projects.locations.workflows.delete
    args:
      name: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
- the_end:
    return: "SUCCESS"

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저를 참조하세요.