arazzo: 1.0.1 info: title: Amazon Well-Architected Tool Share Workload summary: Create a workload, share it with an account, and list its shares. description: >- Stand up a workload and grant another principal access to it. The workflow creates the workload, creates a workload share with the supplied principal and permission level, and lists the workload shares to confirm the share was recorded. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: wellArchitectedApi url: ../openapi/amazon-well-architected-tool-openapi-original.yaml type: openapi workflows: - workflowId: share-workload summary: Create a workload, share it, and list its shares. description: >- Creates a new workload, shares it with the supplied account, IAM role, organization, or OU at the requested permission level, and lists the resulting workload shares. inputs: type: object required: - WorkloadName - Description - Environment - Lenses - ReviewOwner - WorkloadClientRequestToken - SharedWith - PermissionType - ShareClientRequestToken properties: WorkloadName: type: string description: The unique name of the workload (3-100 characters). Description: type: string description: The description for the workload (3-250 characters). Environment: type: string description: The environment for the workload (PRODUCTION or PREPRODUCTION). Lenses: type: array description: The list of lens aliases to associate with the workload. items: type: string ReviewOwner: type: string description: The review owner of the workload. WorkloadClientRequestToken: type: string description: Idempotency token for the workload create request. SharedWith: type: string description: The account ID, IAM role, organization ID, or OU ID to share with. PermissionType: type: string description: The permission granted on the share (READONLY or CONTRIBUTOR). ShareClientRequestToken: type: string description: Idempotency token for the share create request. steps: - stepId: createWorkload description: >- Create the workload that will be shared with another principal. operationId: CreateWorkload requestBody: contentType: application/json payload: WorkloadName: $inputs.WorkloadName Description: $inputs.Description Environment: $inputs.Environment Lenses: $inputs.Lenses ReviewOwner: $inputs.ReviewOwner ClientRequestToken: $inputs.WorkloadClientRequestToken successCriteria: - condition: $statusCode == 200 outputs: workloadId: $response.body#/WorkloadId - stepId: createWorkloadShare description: >- Share the workload with the supplied principal at the requested permission level. operationId: CreateWorkloadShare parameters: - name: WorkloadId in: path value: $steps.createWorkload.outputs.workloadId requestBody: contentType: application/json payload: SharedWith: $inputs.SharedWith PermissionType: $inputs.PermissionType ClientRequestToken: $inputs.ShareClientRequestToken successCriteria: - condition: $statusCode == 200 outputs: shareId: $response.body#/ShareId - stepId: listWorkloadShares description: >- List the workload shares to confirm the new share was recorded. operationId: ListWorkloadShares parameters: - name: WorkloadId in: path value: $steps.createWorkload.outputs.workloadId successCriteria: - condition: $statusCode == 200 outputs: workloadShareSummaries: $response.body#/WorkloadShareSummaries outputs: workloadId: $steps.createWorkload.outputs.workloadId shareId: $steps.createWorkloadShare.outputs.shareId workloadShareSummaries: $steps.listWorkloadShares.outputs.workloadShareSummaries