Amazon S3 · Arazzo Workflow

Amazon S3 Apply and Verify a Lifecycle Configuration

Version 1.0.0

Put a bucket lifecycle configuration then read it back to confirm.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArchiveBackupCloud StorageData StorageObject StorageScalable StorageArazzoWorkflows

Provider

amazon-s3

Workflows

set-and-verify-lifecycle
Put a bucket lifecycle configuration then get it back to confirm.
Applies a BucketLifecycleConfiguration with PutBucketLifecycleConfiguration and confirms it with GetBucketLifecycleConfiguration.
2 steps inputs: bucket, rules outputs: rules
1
putLifecycle
PutBucketLifecycleConfiguration
Write the lifecycle configuration to the bucket, replacing any existing configuration.
2
getLifecycle
GetBucketLifecycleConfiguration
Read the lifecycle configuration back to confirm the rules are now in effect on the bucket.

Source API Descriptions

Arazzo Workflow Specification

amazon-s3-set-bucket-lifecycle-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon S3 Apply and Verify a Lifecycle Configuration
  summary: Put a bucket lifecycle configuration then read it back to confirm.
  description: >-
    A storage cost-management flow for Amazon S3. The workflow writes a lifecycle
    configuration to the bucket — rules that transition or expire objects over
    time — and then reads the configuration back to confirm it was applied.
    Lifecycle rules keep storage cost effective across an object's lifecycle.
    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: s3RestApi
  url: ../openapi/amazon-s3-rest-api-openapi.yml
  type: openapi
workflows:
- workflowId: set-and-verify-lifecycle
  summary: Put a bucket lifecycle configuration then get it back to confirm.
  description: >-
    Applies a BucketLifecycleConfiguration with PutBucketLifecycleConfiguration
    and confirms it with GetBucketLifecycleConfiguration.
  inputs:
    type: object
    required:
    - bucket
    - rules
    properties:
      bucket:
        type: string
        description: The bucket to configure lifecycle rules on.
      rules:
        type: array
        description: The list of lifecycle Rule definitions to apply.
        items:
          type: object
          properties:
            ID:
              type: string
            Status:
              type: string
            Filter:
              type: object
            Expiration:
              type: object
  steps:
  - stepId: putLifecycle
    description: >-
      Write the lifecycle configuration to the bucket, replacing any existing
      configuration.
    operationId: PutBucketLifecycleConfiguration
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    requestBody:
      contentType: application/xml
      payload:
        Rule: $inputs.rules
    successCriteria:
    - condition: $statusCode == 200
  - stepId: getLifecycle
    description: >-
      Read the lifecycle configuration back to confirm the rules are now in
      effect on the bucket.
    operationId: GetBucketLifecycleConfiguration
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      rules: $response.body#/Rule
  outputs:
    rules: $steps.getLifecycle.outputs.rules