Amazon Polly · Arazzo Workflow

Amazon Polly Lexicon Lifecycle

Version 1.0.0

Store a lexicon, list lexicons, read it back, and delete it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AIMachine LearningSpeech SynthesisText-To-SpeechTTSVoiceSSMLNeural EngineGenerative AIArazzoWorkflows

Provider

amazon-polly

Workflows

lexicon-lifecycle
Create, list, read, and delete a pronunciation lexicon.
Stores a PLS lexicon, lists lexicons in the region, reads the stored lexicon back, and deletes it to leave the region clean.
4 steps inputs: amzDate, authorization, content, contentSha256, lexiconName, securityToken outputs: lexiconName, lexicons
1
putLexicon
PutLexicon
Store the PLS lexicon under the supplied name.
2
listLexicons
ListLexicons
List the lexicons stored in the region to confirm the new one is present.
3
getLexicon
GetLexicon
Retrieve the stored lexicon content and attributes.
4
deleteLexicon
DeleteLexicon
Delete the lexicon to remove it from the region.

Source API Descriptions

Arazzo Workflow Specification

amazon-polly-lexicon-lifecycle-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Polly Lexicon Lifecycle
  summary: Store a lexicon, list lexicons, read it back, and delete it.
  description: >-
    Exercises the full CRUD lifecycle of an Amazon Polly pronunciation lexicon.
    The workflow stores a PLS lexicon with PutLexicon, lists lexicons to confirm
    it appears in the region, retrieves its content and attributes with
    GetLexicon, and finally removes it with DeleteLexicon. Each step spells out
    its request inline, including the AWS Signature Version 4 signing headers, so
    the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: pollyApi
  url: ../openapi/amazon-polly-openapi-original.yaml
  type: openapi
workflows:
- workflowId: lexicon-lifecycle
  summary: Create, list, read, and delete a pronunciation lexicon.
  description: >-
    Stores a PLS lexicon, lists lexicons in the region, reads the stored lexicon
    back, and deletes it to leave the region clean.
  inputs:
    type: object
    required:
    - lexiconName
    - content
    - amzDate
    - authorization
    properties:
      lexiconName:
        type: string
        description: Case-sensitive alphanumeric lexicon name (1-20 chars).
      content:
        type: string
        description: The PLS lexicon content as a string.
      amzDate:
        type: string
        description: The X-Amz-Date timestamp used to sign the requests.
      authorization:
        type: string
        description: The full SigV4 Authorization header value for the request.
      contentSha256:
        type: string
        description: The X-Amz-Content-Sha256 hex digest of the request payload.
      securityToken:
        type: string
        description: Optional X-Amz-Security-Token for temporary credentials.
  steps:
  - stepId: putLexicon
    description: Store the PLS lexicon under the supplied name.
    operationId: PutLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    requestBody:
      contentType: application/json
      payload:
        Content: $inputs.content
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $statusCode
  - stepId: listLexicons
    description: List the lexicons stored in the region to confirm the new one is present.
    operationId: ListLexicons
    parameters:
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lexicons: $response.body#/Lexicons
      nextToken: $response.body#/NextToken
  - stepId: getLexicon
    description: Retrieve the stored lexicon content and attributes.
    operationId: GetLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lexiconName: $response.body#/Lexicon/Name
      lexiconAttributes: $response.body#/LexiconAttributes
  - stepId: deleteLexicon
    description: Delete the lexicon to remove it from the region.
    operationId: DeleteLexicon
    parameters:
    - name: LexiconName
      in: path
      value: $inputs.lexiconName
    - name: X-Amz-Date
      in: header
      value: $inputs.amzDate
    - name: Authorization
      in: header
      value: $inputs.authorization
    - name: X-Amz-Content-Sha256
      in: header
      value: $inputs.contentSha256
    - name: X-Amz-Security-Token
      in: header
      value: $inputs.securityToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $statusCode
  outputs:
    lexiconName: $steps.getLexicon.outputs.lexiconName
    lexicons: $steps.listLexicons.outputs.lexicons