Workflows 정의용 커넥터

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

이 코드 샘플이 포함된 문서 페이지

컨텍스트에서 사용된 코드 샘플을 보려면 다음 문서를 참조하세요.

코드 샘플

YAML

# This workflow demonstrates how to use the Cloud Workflows connector.
# The workflow creates/gets/deletes a workflow.
# Expected successful output: "SUCCESS"

- init:
    assign:
    - project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
    - location: "us-central1"
    - workflow: "dummy-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: "A dummy workflow to be created and deleted."
        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 샘플 브라우저를 참조하세요.